From 19c2f3d78f2dad147c299035efc794cc5d6442a9 Mon Sep 17 00:00:00 2001 From: XadillaX Date: Wed, 5 May 2021 15:26:53 +0800 Subject: [PATCH] buffer: remove TODOs in `atob` / `btoa` Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932 --- lib/buffer.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 951805870c5870..3124941a549a56 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1220,8 +1220,6 @@ const lazyInvalidCharError = hideStackFrames((message, name) => { }); function btoa(input) { - // TODO(@jasnell): The implementation here has not been performance - // optimized in any way. input = `${input}`; for (let n = 0; n < input.length; n++) { if (input[n].charCodeAt(0) > 0xff) @@ -1235,8 +1233,6 @@ const kBase64Digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; function atob(input) { - // TODO(@jasnell): The implementation here has not been performance - // optimized in any way. input = `${input}`; for (let n = 0; n < input.length; n++) { if (!kBase64Digits.includes(input[n]))