https://github.com/fabiospampinato/are-deeply-equal
Check if two values are deeply equal to each other.
https://github.com/fabiospampinato/are-deeply-equal
check deep equal
Last synced: 11 months ago
JSON representation
Check if two values are deeply equal to each other.
- Host: GitHub
- URL: https://github.com/fabiospampinato/are-deeply-equal
- Owner: fabiospampinato
- License: mit
- Created: 2022-11-04T21:34:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-12T18:13:44.000Z (over 1 year ago)
- Last Synced: 2025-06-28T23:13:04.754Z (12 months ago)
- Topics: check, deep, equal
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Are Deeply Equal
Check if two values are deeply equal to each other.
It supports comparing primitives, `Array`, `Map`, `Set`, `Date`, `RegExp`, `ArrayBuffer`, `DataView`, `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array`, `Float64Array`, `BigInt64Array`, `BigUint64Array`, `Promise`, `WeakMap`, `WeakSet`, `Node`, plain objects, objects with a custom `valueOf` function, and other classes (which are treated like plain objects).
## Install
```sh
npm install are-deeply-equal
```
## Usage
```ts
import areDeeplyEqual from 'are-deeply-equal';
// Let's compare two values for deep equality
areDeeplyEqual ( [123, { value: 'foo' }], [123, { value: 'foo' }] ); // => true
areDeeplyEqual ( [true], [false] ); // => false
```
## License
MIT © Fabio Spampinato