Skip to content

Commit 0b6f0a0

Browse files
XadillaXaduh95
authored andcommitted
buffer: remove TODOs in atob / btoa
Refs: #38433 (comment) PR-URL: #38548 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 52e4fb5 commit 0b6f0a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/buffer.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1217,8 +1217,9 @@ const lazyInvalidCharError = hideStackFrames((message, name) => {
12171217
});
12181218

12191219
function btoa(input) {
1220-
// TODO(@jasnell): The implementation here has not been performance
1221-
// optimized in any way.
1220+
// The implementation here has not been performance optimized in any way and
1221+
// should not be.
1222+
// Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
12221223
input = `${input}`;
12231224
for (let n = 0; n < input.length; n++) {
12241225
if (input[n].charCodeAt(0) > 0xff)
@@ -1232,8 +1233,9 @@ const kBase64Digits =
12321233
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
12331234

12341235
function atob(input) {
1235-
// TODO(@jasnell): The implementation here has not been performance
1236-
// optimized in any way.
1236+
// The implementation here has not been performance optimized in any way and
1237+
// should not be.
1238+
// Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
12371239
input = `${input}`;
12381240
for (let n = 0; n < input.length; n++) {
12391241
if (!kBase64Digits.includes(input[n]))

0 commit comments

Comments
 (0)