MCPcopy Index your code
hub / github.com/nodejs/node / btoa

Function btoa

lib/buffer.js:1376–1388  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

1374}
1375
1376function btoa(input) {
1377 // The implementation here has not been performance optimized in any way and
1378 // should not be.
1379 // Refs: https://github.com/nodejs/node/pull/38433#issuecomment-828426932
1380 if (arguments.length === 0) {
1381 throw new ERR_MISSING_ARGS('input');
1382 }
1383 const result = _btoa(`${input}`);
1384 if (result === -1) {
1385 throw lazyDOMException('Invalid character', 'InvalidCharacterError');
1386 }
1387 return result;
1388}
1389
1390function atob(input) {
1391 if (arguments.length === 0) {

Callers 6

mainFunction · 0.85
mainFunction · 0.85
testBtoaFunction · 0.85
invokeFromWorkerFunction · 0.85

Calls 1

lazyDOMExceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…