* @see https://infra.spec.whatwg.org/#isomorphic-decode * @param {Uint8Array} input * @returns {string}
(input)
| 348 | * @returns {string} |
| 349 | */ |
| 350 | function isomorphicDecode(input) { |
| 351 | // 1. To isomorphic decode a byte sequence input, return a string whose code point |
| 352 | // length is equal to input's length and whose code points have the same values |
| 353 | // as the values of input's bytes, in the same order. |
| 354 | const length = input.length; |
| 355 | if ((2 << 15) - 1 > length) { |
| 356 | return StringFromCharCodeApply(input); |
| 357 | } |
| 358 | let result = ''; let i = 0; |
| 359 | let addition = (2 << 15) - 1; |
| 360 | while (i < length) { |
| 361 | if (i + addition > length) { |
| 362 | addition = length - i; |
| 363 | } |
| 364 | result += StringFromCharCodeApply(TypedArrayPrototypeSubarray(input, i, i += addition)); |
| 365 | } |
| 366 | return result; |
| 367 | } |
| 368 | |
| 369 | module.exports = { |
| 370 | dataURLProcessor, |
no outgoing calls
no test coverage detected
searching dependent graphs…