将 BufferSource 转换为 Base64 编码的字符串。
需要编码的数据,可以是 ArrayBuffer、TypedArray 或 DataView。
Base64 编码的字符串。
const buffer = new Uint8Array([72, 101, 108, 108, 111]);const base64 = base64FromBuffer(buffer);console.log(base64); // 'SGVsbG8=' Copy
const buffer = new Uint8Array([72, 101, 108, 108, 111]);const base64 = base64FromBuffer(buffer);console.log(base64); // 'SGVsbG8='
将 BufferSource 转换为 Base64 编码的字符串。