deep-strict-equal

Test for deep equality - Node.js `assert.deepStrictEqual()` algorithm as a standalone module

Just use `util.isDeepStrictEqual()`. It has been available since Node.js 10.
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install deep-strict-equal 
SYNC missed versions from official npm registry.

This package is deprecated as it's too much effort to keep it in sync with the Node.js implementation.


deep-strict-equal

Test for deep equality - Node.js assert.deepStrictEqual() algorithm as a standalone module

Issues and improvements should be done in Node.js first.

Install

$ npm install --save deep-strict-equal

Usage

const deepStrictEqual = require('deep-strict-equal');

deepStrictEqual({foo: {bar: [1, 2]}}, {foo: {bar: [1, 2]}});
//=> true

deepStrictEqual({foo: {bar: [1, 2]}}, {foo: {bar: [1, 4]}});
//=> false

deepStrictEqual({foo: {bar: 1}}, {foo: {bar: 1}});
//=> true

deepStrictEqual({foo: {bar: 1}}, {foo: {bar: '1'}});
//=> false

License

MIT © Sindre Sorhus

Current Tags

  • 0.3.0                                ...           latest (5 years ago)

3 Versions

  • 0.3.0 [deprecated]           ...           5 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE