https://github.com/sindresorhus/deep-strict-equal
Test for deep equality - Node.js `assert.deepStrictEqual()` algorithm as a standalone module
https://github.com/sindresorhus/deep-strict-equal
Last synced: about 2 months ago
JSON representation
Test for deep equality - Node.js `assert.deepStrictEqual()` algorithm as a standalone module
- Host: GitHub
- URL: https://github.com/sindresorhus/deep-strict-equal
- Owner: sindresorhus
- License: mit
- Archived: true
- Created: 2015-09-28T07:52:58.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2021-09-17T04:45:46.000Z (about 4 years ago)
- Last Synced: 2024-04-13T17:38:01.755Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 21
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-nodejs-precise - deep-strict-equal - strict-equal .svg?style=social&label=Star&maxAge=2592000?style=flat-square)]() | Test for deep equality - Node.js <code>assert.deepStrictEqual()</code> algorithm as a standalone module. | (Packages / Polyfills Node.js)
- awesome-nodejs-cn - deep-strict-equal - Test for deep equality - Node.js `assert.deepStrictEqual()` algorithm as a standalone module. (Number / Polyfills)
README
This package is deprecated as it's too much effort to keep it in sync with the Node.js implementation. Just use [`util.isDeepStrictEqual()`](https://nodejs.org/api/util.html#util_util_isdeepstrictequal_val1_val2).
---
# deep-strict-equal
> Test for deep equality - Node.js [`assert.deepStrictEqual()`](https://nodejs.org/api/assert.html#assert_assert_deepstrictequal_actual_expected_message) algorithm as a standalone module
## Install
```
$ npm install deep-strict-equal
```
## Usage
```js
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
```