decomparefy
v1.0.3
Published
Deep data comparisons
Downloads
8
Maintainers
Readme
decomparefy
Deep data compare
Installation
npm
npm install --save decomparefy
yarn
yarn add decomparefy
Usage
import { isEqual } from 'decomparefy';
isEqual(1, 1); //=> true
isEqual({}, {}); //=> true
isEqual('foo', 'foo'); //=> true
isEqual([1, 2, 3], [1, 2, 3]); //=> true
isEqual(() => {}, () => {}); //=> true
isEqual(/foo/, /foo/); //=> true
isEqual(null, null); //=> true
isEqual(NaN, NaN); //=> true
isEqual([], []); //=> true
isEqual(
[{ a:1 }, [{ b:{ c:[1] } }]],
[{ a:1 }, [{ b:{ c:[1] } }]]
); //=> true
isEqual(1, '1'); //=> false
isEqual(null, undefined); //=> false
isEqual({ a:1, b:[2,3] }, { a:1, b:[2,5] }); //=> false
isEqual(/foo/i, /bar/g); //=> false
License
The package is Open Source Software released under the MIT licensed.
This library was generated with Nx.