We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca00732 commit 1d9aaffCopy full SHA for 1d9aaff
src/util.ts
@@ -36,8 +36,8 @@ export function arrayBufferToBase64(ab: ArrayBuffer): string {
36
let binary = '';
37
38
// Convert each byte to a character
39
- for (let i = 0; i < bytes.length; i++) {
40
- binary += String.fromCharCode(bytes[i]);
+ for (const byte of bytes) {
+ binary += String.fromCharCode(byte);
41
}
42
43
// Encode the binary string as Base64
@@ -55,7 +55,7 @@ export function base64ToArrayBuffer(b64: string): ArrayBuffer {
55
56
// Convert each character to its corresponding byte
57
for (let i = 0; i < len; i++) {
58
- bytes[i] = binaryString.charCodeAt(i);
+ bytes[i] = binaryString.charCodeAt(i);
59
60
61
// Return the ArrayBuffer
0 commit comments