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

Function isomorphicDecode

deps/undici/undici.js:4287–4302  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

4285 }
4286 __name(isASCIIWhitespace, "isASCIIWhitespace");
4287 function isomorphicDecode(input) {
4288 const length = input.length;
4289 if ((2 << 15) - 1 > length) {
4290 return String.fromCharCode.apply(null, input);
4291 }
4292 let result = "";
4293 let i = 0;
4294 let addition = (2 << 15) - 1;
4295 while (i < length) {
4296 if (i + addition > length) {
4297 addition = length - i;
4298 }
4299 result += String.fromCharCode.apply(null, input.subarray(i, i += addition));
4300 }
4301 return result;
4302 }
4303 __name(isomorphicDecode, "isomorphicDecode");
4304 var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
4305 function isomorphicEncode(input) {

Callers 2

dataURLProcessorFunction · 0.70

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…