Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/core-js/modules/web.atob.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $({ global: true, bind: true, enumerable: true, forced: FORCED }, {
// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
if (BASIC && !NO_SPACES_IGNORE && !NO_ENCODING_CHECK) return call($atob, globalThis, data);
var string = replace(toString(data), whitespaces, '');
var output = '';
var output = [];
var position = 0;
var bc = 0;
var length, chr, bs;
Expand All @@ -61,7 +61,7 @@ $({ global: true, bind: true, enumerable: true, forced: FORCED }, {
while (position < length) {
chr = charAt(string, position++);
bs = bc % 4 ? bs * 64 + c2i[chr] : c2i[chr];
if (bc++ % 4) output += fromCharCode(255 & bs >> (-2 * bc & 6));
} return output;
if (bc++ % 4) output.push(fromCharCode(255 & bs >> (-2 * bc & 6)));
} return output.join('');
}
});
6 changes: 3 additions & 3 deletions packages/core-js/modules/web.btoa.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $({ global: true, bind: true, enumerable: true, forced: !BASIC || NO_ARG_RECEIVI
// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
if (BASIC) return call($btoa, globalThis, toString(data));
var string = toString(data);
var output = '';
var output = [];
var position = 0;
var map = i2c;
var block, charCode;
Expand All @@ -45,7 +45,7 @@ $({ global: true, bind: true, enumerable: true, forced: !BASIC || NO_ARG_RECEIVI
throw new (getBuiltIn('DOMException'))('The string contains characters outside of the Latin1 range', 'InvalidCharacterError');
}
block = block << 8 | charCode;
output += charAt(map, 63 & block >> 8 - position % 1 * 8);
} return output;
output.push(charAt(map, 63 & block >> 8 - position % 1 * 8));
} return output.join('');
}
});