1.0.2 • Published 4 years ago

deep-compare-any-order v1.0.2

Weekly downloads
1,150
License
Apache-2.0
Repository
github
Last release
4 years ago

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;