import { includesSlice } from "https://deno.land/x/ayonli_jsext@v0.9.72/uint8array/index.ts";
Checks if the byte array contains another array as a slice of its contents.
Examples
Example 1
Example 1
import { includesSlice } from "@ayonli/jsext/bytes";
const arr = new Uint8Array([1, 2, 3, 4, 5]);
console.log(includesSlice(arr, new Uint8Array([3, 4]))); // true
console.log(includesSlice(arr, new Uint8Array([4, 3]))); // false