-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
/**
* @param {Uint8Array} bytes
* @returns {string}
*/
function base64Encode(bytes) {
var binary = "";
var bytes = new Uint8Array(buffer);
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode(bytes[i]);
}
return globalThis.btoa(binary);
}
You use bytes
as both an argument name and a local var name, but don't define buffer
. I believe this is a typo.
Metadata
Metadata
Assignees
Labels
No labels