API reference@evolu/commonEq › eqUint8Array

const eqUint8Array: Eq<Uint8Array> = eqArrayNumber;

Defined in: packages/common/src/Eq.ts:187

Compares two Uint8Arrays by byte value.

Example

import { assertFalse, assertTrue, eqUint8Array } from "@evolu/common";

assertTrue(eqUint8Array(new Uint8Array([1, 2]), new Uint8Array([1, 2])));
assertFalse(eqUint8Array(new Uint8Array([1, 2]), new Uint8Array([1, 3])));