mol_compare_deep
v0.0.1064
Published
Deeply compares two values. Supports cyclic references. Uses cache to prevent multiple comparison of same pair.
Downloads
1,141
Maintainers
Readme
$mol_compare_deep
Deeply compares two values. Supports cyclic references. Uses cache to prevent multiple comparison of same pair.
Benchmark
Usage from MAM
let x = { a: new Uint8Array([1]) }
let y = { a: new Uint8Array([1]) }
x.b = y
y.b = x
// true, equals
$mol_compare_deep( x, y )
// false, don't equals
$mol_compare_deep( new Uint8Array([1]), new Uint8Array([2]) )
Usage from NPM
npm install mol_compare_deep
Import as ESM
import { $mol_compare_deep } from 'mol_compare_deep'
Import as CJS
const { $mol_compare_deep } = require( 'mol_compare_deep' )