deep-equal-extended
v0.0.2
Published
Extended deepEqual function
Downloads
13
Readme
Extended deepEqual function
Supports BN.js, Buffer, primitives, objects and array.
Installation
$ npm i deep-equal-extended -S
Usage
import * as BN from "bn.js";
import { deepEqual } from "deep-equal-extended";
console.log(deepEqual({ a: 1, b: 2 }, { a: 1, b: 2 })); // true
console.log(deepEqual({ a: new BN(1), b: 2 }, { a: new BN(1), b: 2 })); // true
console.log(deepEqual({ a: new BN(2), b: 2 }, { a: new BN(1), b: 2 })); // false
Testing
$ npm test
License
The MIT License