We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
atob
btoa
1 parent efd70f4 commit 19c2f3dCopy full SHA for 19c2f3d
lib/buffer.js
@@ -1220,8 +1220,6 @@ const lazyInvalidCharError = hideStackFrames((message, name) => {
1220
});
1221
1222
function btoa(input) {
1223
- // TODO(@jasnell): The implementation here has not been performance
1224
- // optimized in any way.
1225
input = `${input}`;
1226
for (let n = 0; n < input.length; n++) {
1227
if (input[n].charCodeAt(0) > 0xff)
@@ -1235,8 +1233,6 @@ const kBase64Digits =
1235
1233
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
1236
1234
1237
function atob(input) {
1238
1239
1240
1241
1242
if (!kBase64Digits.includes(input[n]))
0 commit comments