This commit is contained in:
James Babcock committed 2026-05-12 12:41:52 -07:00
1 parent adb93ae441
commit bcb162ecaf
8 files changed
+214 -392

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
export function toUint8Array(bytes: ArrayLike<number> | null | undefined): Uint8Array {
if (!bytes) return new Uint8Array(0);
const out = new Uint8Array(bytes.length);
for (let i = 0; i < bytes.length; i++) {
out[i] = bytes[i]! & 0xff;
}
return out;
}