JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1869
  • Score
    100M100P100Q110383F
  • License MIT

Blazing fast utility for deep equality checks

Package Exports

  • deep-equal-js
  • deep-equal-js/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deep-equal-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

deep-equal-js

Blazing fast utility for deep equality checks.

Features

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.

Installation

npm install deep-equal-js

Alternatively, if you use Yarn:

yarn add deep-equal-js

Usage

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

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Something Missing?

If you find any issues or have suggestions for improvements, feel free to contribute or open an issue on our GitHub Repository.