All files / app/utils arrayEq.ts

83.33% Statements 10/12
80% Branches 8/10
100% Functions 1/1
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11299x 299x 186x 186x   184x 204x   184x    
export function arrayEq(a: (number | string | boolean | undefined)[], b: (number | string | boolean | undefined)[]) {
  if (a === b) return true;
  Iif (a == null || b == null) return false;
  if (a.length !== b.length) return false;
 
  for (let i = 0; i < a.length; ++i) {
    Iif (a[i] !== b[i]) return false;
  }
  return true;
}