are-deeply-equal

Check if two values are deeply equal to each other.

MIT 7 个版本
安装
npm install are-deeply-equal
yarn add are-deeply-equal
pnpm add are-deeply-equal
bun add are-deeply-equal
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

npm install are-deeply-equal

Usage

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

版本列表
1.1.2 2025-01-12
1.1.1 2024-02-04
1.1.0 2024-02-04
1.0.3 2023-12-22
1.0.2 2023-03-05
1.0.1 2022-11-05
1.0.0 2022-11-04