diff --git a/lib/buffer.js b/lib/buffer.js index bb4710d3682d34..b16d696b023fe1 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1212,8 +1212,9 @@ const lazyInvalidCharError = hideStackFrames((message, name) => { }); function btoa(input) { - // TODO(@jasnell): The implementation here has not been performance - // optimized in any way. + // The implementation here has not been performance optimized in any way and + // should not be. + // Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932 input = `${input}`; for (let n = 0; n < input.length; n++) { if (input[n].charCodeAt(0) > 0xff) @@ -1227,8 +1228,9 @@ const kBase64Digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; function atob(input) { - // TODO(@jasnell): The implementation here has not been performance - // optimized in any way. + // The implementation here has not been performance optimized in any way and + // should not be. + // Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932 input = `${input}`; for (let n = 0; n < input.length; n++) { if (!kBase64Digits.includes(input[n]))