All files / app/utils arrayEq.ts

91.66% Statements 11/12
83.33% Branches 5/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 1430x       3201x 2315x 2315x   2228x 2467x   2216x    
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) {
    if (a[i] !== b[i]) return false;
  }
  return true;
}