deep-equal-extended
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i deep-equal-extended

Weekly Downloads

4

Version

0.0.2

License

MIT

Unpacked Size

5.9 kB

Total Files

11

Last publish

Collaborators

  • staszek