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

Function forgivingBase64

github-actions/browserstack/set-browserstack-env.js:3633–3652  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

3631 const type = collectASequenceOfCodePointsFast(
3632 "/",
3633 input,
3634 position
3635 );
3636 if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {
3637 return "failure";
3638 }
3639 if (position.position > input.length) {
3640 return "failure";
3641 }
3642 position.position++;
3643 let subtype = collectASequenceOfCodePointsFast(
3644 ";",
3645 input,
3646 position
3647 );
3648 subtype = removeHTTPWhitespace(subtype, false, true);
3649 if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {
3650 return "failure";
3651 }
3652 const typeLowercase = type.toLowerCase();
3653 const subtypeLowercase = subtype.toLowerCase();
3654 const mimeType = {
3655 type: typeLowercase,

Callers 1

dataURLProcessorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected