Blazing fast utility for deep equality checks.
ES6 module supporting JavaScript and TypeScript.
Supports checking:
- Objects
- Arrays
- Maps
- Sets
- TypedArray
- RegExp
- Date
- Primitives and primitive wrappers (String, Number, Boolean)
- null, undefined, and NaN.
npm install deep-equal-js
Alternatively, if you use Yarn:
yarn add deep-equal-js
import deepEqual from 'deep-equal-js';
console.log(deepEqual({ a: 1, b: 2 }, { a: 1, b: 2 })); // true
console.log(deepEqual([1, 2], [1, 2])); // true
console.log(deepEqual(9, 9)); // true
console.log(deepEqual('test', 'test')); // true
console.log(deepEqual(NaN, NaN)) // true
conseole.log(deepEqual(9, '9')); // false
console.log(deepEqual(null, undefined)); // false
We welcome contributions from the community to make this library better. If you find any issues or have suggestions for improvements, feel free to contribute or open an issue on our GitHub Repository.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find any issues or have suggestions for improvements, feel free to contribute or open an issue on our GitHub Repository.