first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toUint8Array = void 0;
const toUint8Array = (data) => {
if (data instanceof Uint8Array)
return data;
if (data instanceof ArrayBuffer)
return new Uint8Array(data);
if (Array.isArray(data))
return new Uint8Array(data);
if (typeof Buffer === 'function') {
if (Buffer.isBuffer(data))
return data;
return Buffer.from(data);
}
throw new Error('UINT8ARRAY_INCOMPATIBLE');
};
exports.toUint8Array = toUint8Array;
//# sourceMappingURL=toUint8Array.js.map