(input)
| 1374 | } |
| 1375 | |
| 1376 | function 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 | |
| 1390 | function atob(input) { |
| 1391 | if (arguments.length === 0) { |
no test coverage detected
searching dependent graphs…