0.0.2 • Published 5 years ago

deep-equal-extended v0.0.2

Weekly downloads
22
License
MIT
Repository
github
Last release
5 years ago

Extended deepEqual function

NPM version

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