You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
12 lines
273 B
TypeScript
12 lines
273 B
TypeScript
export const ArrayBufferToBase64 = (buffer: ArrayBuffer) =>
|
|
{
|
|
let binary = '';
|
|
|
|
const bytes = new Uint8Array(buffer);
|
|
const len = bytes.byteLength;
|
|
|
|
for(let i = 0; i < len; i++) (binary += String.fromCharCode(bytes[i]));
|
|
|
|
return window.btoa(binary);
|
|
};
|