GrosSacASac/utilsac

add deepEqual

GrosSacASac opened this issue · 5 comments

draft

function e(a, b) {
  if (Object.is(a, b)) {
    return true;
  }

  if (typeof a !== 'object' || a === null ||
      typeof b !== 'object' || b === null) {
    return false;
  }


  const keysA = Object.keys(a);
  const keysB = Object.keys(b);

  if (keysA.length !== keysB.length) {
    return false;
  }

forEach ...

  return true;
}

I'll give it a shot

mhm good :)

PR is up. I most likely missed things such as styling. Let me know what I need to fix up. Thanks!

we will define the details in follow-up issues/commits

I made several adjustments to have consistent style across the project