Skip to content

Commit

Permalink
buffer: remove TODOs in atob / btoa
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX committed May 5, 2021
1 parent efd70f4 commit 19c2f3d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/buffer.js
Expand Up @@ -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)
Expand All @@ -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]))
Expand Down

0 comments on commit 19c2f3d

Please sign in to comment.