Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

sindresorhus/deep-strict-equal

Repository files navigation

This package is deprecated as it's too much effort to keep it in sync with the Node.js implementation. Just use util.isDeepStrictEqual().


deep-strict-equal

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

Install

$ npm install 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

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published