All files / src/common arrbufs.ts

90% Statements 9/10
75% Branches 3/4
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 101x 2x 2x 2x 2x 10x   1x    
export const equal = (aBuf: ArrayBuffer, bBuf: ArrayBuffer): boolean => {
  const a = new Uint8Array(aBuf)
  const b = new Uint8Array(bBuf)
  Iif (a.length !== b.length) return false
  for (let i = 0; i < a.length; i++) {
    if (a[i] !== b[i]) return false
  }
  return true
}