deep-equal
Advanced tools
Weekly downloads
Changelog
v2.2.0 - 2023-01-05
SharedArrayBuffer
0ef51c7
is-array-buffer
package 0360ee1
whichTypedArray
can return false in both cases df3e3c4
aud
, object.getownpropertydescriptors
6d62ea4
@ljharb/eslint-config
15aab59
which-typed-array
8dfce27
.eslintignore
af46773
Readme
Node's assert.deepEqual() algorithm
as a standalone module.
This module is around 46 times faster than wrapping assert.deepEqual()
in a try/catch
.
var equal = require('deep-equal');
console.dir([
equal(
{ a : [ 2, 3 ], b : [ 4 ] },
{ a : [ 2, 3 ], b : [ 4 ] }
),
equal(
{ x : 5, y : [6] },
{ x : 5, y : 6 }
)
]);
var deepEqual = require('deep-equal')
Compare objects a
and b
, returning whether they are equal according to a
recursive equality algorithm.
If opts.strict
is true
, use strict equality (===
) to compare leaf nodes.
The default is to use coercive equality (==
) because that's how
assert.deepEqual()
works by default.
With npm do:
npm install deep-equal
With npm do:
npm test
node's assert.deepEqual algorithm
The npm package deep-equal receives a total of 18,482,861 weekly downloads. As such, deep-equal popularity was classified as popular.
We found that deep-equal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.