mol_compare_deep
TypeScript icon, indicating that this package has built-in type declarations

0.0.880 • Public • Published

$mol_compare_deep

Deeply compares two values. Supports cyclic references. Uses cache to prevent multiple comparison of same pair.

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' )

Package Sidebar

Install

npm i mol_compare_deep

Weekly Downloads

431

Version

0.0.880

License

none

Unpacked Size

431 kB

Total Files

26

Last publish

Collaborators

  • jin