deep-compare-any-order
v1.0.2
Published
compare object deep when come across array it will compare it in any order
Downloads
10,100
Maintainers
Readme
deep compare object without array order
Usage
const { objectDeepContains, collectionDeepContains, objectDeepCompare } = require('deep-compare-any-order');
const A = { b: { b1: null, b2: 2 }, c: [1, 2, 3] };
const B = { b: { b1: null, b2: 2 }, c: [3, 2, 1] };
objectDeepCompare(A, B) === true;
const A = { a: 1, b: { b1: null, b2: 2 }, c: [1, 2, 3] };
const B = { b: { b1: null, b2: 2 , c: [2, 1, 3] } };
objectDeepContains(A, B) === true;
const B = [1, 2, 3];
const A = [4, 5, 6];
collectionDeepContains(B, A) === true;