openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
8 lines (7 loc) • 323 B
JavaScript
//#region src/plugin-sdk/blob-runtime.ts
/** Use immediately in a Blob constructor, which snapshots this exact byte range. */
function bufferToBlobPart(e) {
return e.buffer instanceof ArrayBuffer ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : Uint8Array.from(e);
}
//#endregion
export { bufferToBlobPart as t };