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

Function URLSerializer

github-actions/browserstack/set-browserstack-env.js:3491–3502  ·  view source on GitHub ↗
(url, excludeFragment = false)

Source from the content-addressed store, hash-verified

3489 var globalOrigin = Symbol.for("undici.globalOrigin.1");
3490 function getGlobalOrigin() {
3491 return globalThis[globalOrigin];
3492 }
3493 function setGlobalOrigin(newOrigin) {
3494 if (newOrigin === void 0) {
3495 Object.defineProperty(globalThis, globalOrigin, {
3496 value: void 0,
3497 writable: true,
3498 enumerable: false,
3499 configurable: false
3500 });
3501 return;
3502 }
3503 const parsedURL = new URL(newOrigin);
3504 if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") {
3505 throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`);

Callers 6

dataURLProcessorFunction · 0.70
redirectMethod · 0.70
urlMethod · 0.70
urlMethod · 0.70
urlEqualsFunction · 0.70
urlMethod · 0.70

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected