import { equals } from "https://deno.land/x/ayonli_jsext@v0.9.72/uint8array/index.ts";
Checks if the two byte arrays are equal to each other.
Examples
Example 1
Example 1
import { equals } from "@ayonli/jsext/bytes";
const arr1 = new Uint8Array([1, 2, 3]);
const arr2 = new Uint8Array([1, 2, 3]);
const arr3 = new Uint8Array([1, 2, 4]);
console.log(equals(arr1, arr2)); // true
console.log(equals(arr1, arr3)); // false