Skip to content

Commit 4f5368e

Browse files
committed
f
1 parent 19c2f3d commit 4f5368e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/buffer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,9 @@ const lazyInvalidCharError = hideStackFrames((message, name) => {
12201220
});
12211221

12221222
function btoa(input) {
1223+
// The implementation here has not been performance optimized in any way and
1224+
// should not be.
1225+
// Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
12231226
input = `${input}`;
12241227
for (let n = 0; n < input.length; n++) {
12251228
if (input[n].charCodeAt(0) > 0xff)
@@ -1233,6 +1236,9 @@ const kBase64Digits =
12331236
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
12341237

12351238
function atob(input) {
1239+
// The implementation here has not been performance optimized in any way and
1240+
// should not be.
1241+
// Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
12361242
input = `${input}`;
12371243
for (let n = 0; n < input.length; n++) {
12381244
if (!kBase64Digits.includes(input[n]))

0 commit comments

Comments
 (0)