MCPcopy Create free account
hub / github.com/TanStack/db / areUint8ArraysEqual

Function areUint8ArraysEqual

packages/db/src/utils/comparison.ts:152–162  ·  view source on GitHub ↗

* Compare two Uint8Arrays for content equality

(a: Uint8Array, b: Uint8Array)

Source from the content-addressed store, hash-verified

150 * Compare two Uint8Arrays for content equality
151 */
152function areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean {
153 if (a.byteLength !== b.byteLength) {
154 return false
155 }
156 for (let i = 0; i < a.byteLength; i++) {
157 if (a[i] !== b[i]) {
158 return false
159 }
160 }
161 return true
162}
163
164/**
165 * Threshold for normalizing Uint8Arrays to string representations.

Callers 1

areValuesEqualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected