MCPcopy Create free account
hub / github.com/angular/dev-infra / isomorphicDecode

Function isomorphicDecode

github-actions/browserstack/set-browserstack-env.js:3728–3743  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

3726 while (lead < str.length && predicate(str.charCodeAt(lead)))
3727 lead++;
3728 }
3729 if (trailing) {
3730 while (trail > 0 && predicate(str.charCodeAt(trail)))
3731 trail--;
3732 }
3733 return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1);
3734 }
3735 function isomorphicDecode(input) {
3736 const length = input.length;
3737 if ((2 << 15) - 1 > length) {
3738 return String.fromCharCode.apply(null, input);
3739 }
3740 let result = "";
3741 let i = 0;
3742 let addition = (2 << 15) - 1;
3743 while (i < length) {
3744 if (i + addition > length) {
3745 addition = length - i;
3746 }

Callers 2

dataURLProcessorFunction · 0.70

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected