is-equal

WebJar for is-equal

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

is-equal
Last Version

Last Version

1.6.1
Release Date

Release Date

Type

Type

jar
Description

Description

is-equal
WebJar for is-equal
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/inspect-js/is-equal

Download is-equal

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/is-equal/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>is-equal</artifactId>
    <version>1.6.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/is-equal/
implementation 'org.webjars.npm:is-equal:1.6.1'
// https://jarcasting.com/artifacts/org.webjars.npm/is-equal/
implementation ("org.webjars.npm:is-equal:1.6.1")
'org.webjars.npm:is-equal:jar:1.6.1'
<dependency org="org.webjars.npm" name="is-equal" rev="1.6.1">
  <artifact name="is-equal" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='is-equal', version='1.6.1')
)
libraryDependencies += "org.webjars.npm" % "is-equal" % "1.6.1"
[org.webjars.npm/is-equal "1.6.1"]

Dependencies

compile (18)

Group / Artifact Type Version
org.webjars.npm : es-get-iterator jar [1.0.1,2)
org.webjars.npm : is-symbol jar [1.0.3,2)
org.webjars.npm : is-date-object jar [1.0.1,2)
org.webjars.npm : which-boxed-primitive jar [1.0.1,2)
org.webjars.npm : is-generator-function jar [1.0.7,2)
org.webjars.npm : object-inspect jar [1.7.0,2)
org.webjars.npm : object.entries jar [1.1.0,2)
org.webjars.npm : is-bigint jar [1.0.0,2)
org.webjars.npm : is-boolean-object jar [1.0.0,2)
org.webjars.npm : is-arrow-function jar [2.0.3,3)
org.webjars.npm : is-callable jar [1.1.4,2)
org.webjars.npm : which-collection jar [1.0.0,2)
org.webjars.npm : has jar [1.0.3,2)
org.webjars.npm : is-number-object jar [1.0.3,2)
org.webjars.npm : isarray jar [2.0.5,3)
org.webjars.npm : functions-have-names jar [1.2.0,2)
org.webjars.npm : is-string jar [1.0.4,2)
org.webjars.npm : is-regex jar [1.0.4,2)

Project Modules

There are no modules declared in this project.

is-equal Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Are these two values conceptually equal?

Example

var isEqual = require('is-equal');
var assert = require('assert');

var primitives = [true, false, undefined, 42, 'foo'];
primitives.forEach(function (primitive) {
	assert.equal(isEqual(primitive, primitive), true);
});
assert.equal(isEqual(/a/g, /a/g));
assert.equal(isEqual(/a/g, new RegExp('a', 'g')));
assert.equal(isEqual({ a: 2 }, { a: 2 }), true);
assert.equal(isEqual([1, [2, 3], 4], [1, [2, 3], 4]), true);
var timestamp = Date.now();
assert.equal(isEqual(new Date(timestamp), new Date(timestamp)), true);

Want to know why two values are not equal?

Will return an empty string if isEqual would return true - otherwise will return a non-empty string that hopefully explains the reasoning.

var whyNotEqual = require('is-equal/why');

assert.equal(whyNotEqual(1, 1), '');
assert.equal(
  whyNotEqual({ a: 1 }, { a: 2 }),
  'value at key "a" differs: numbers are different: 1 !== 2'
);

Tests

Simply clone the repo, npm install, and run npm test

org.webjars.npm

Inspect JS

JavaScript value inspection tools.

Versions

Version
1.6.1
1.5.5