forked from Blendman974/faceclaw
Refactor
This commit is contained in:
1 parent
adb93ae441
commit
bcb162ecaf
8 files changed
+214
-392
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user