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

Function removeChars

github-actions/browserstack/set-browserstack-env.js:3715–3727  ·  view source on GitHub ↗
(str, leading, trailing, predicate)

Source from the content-addressed store, hash-verified

3713 if (dataLength % 4 === 0) {
3714 if (data.charCodeAt(dataLength - 1) === 61) {
3715 --dataLength;
3716 if (data.charCodeAt(dataLength - 1) === 61) {
3717 --dataLength;
3718 }
3719 }
3720 }
3721 if (dataLength % 4 === 1) {
3722 return "failure";
3723 }
3724 if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {
3725 return "failure";
3726 }
3727 const buffer = Buffer.from(data, "base64");
3728 return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
3729 }
3730 function collectAnHTTPQuotedString(input, position, extractValue) {

Callers 4

removeHTTPWhitespaceFunction · 0.70
removeASCIIWhitespaceFunction · 0.70
gettingDecodingSplittingFunction · 0.70

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected