All files / app/utils arrayEq.ts

83.33% Statements 10/12
66.66% Branches 4/6
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 11 12 13 14364x       364x 267x 267x   265x 277x   265x    
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;
}