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

Function parseOrigin

github-actions/browserstack/set-browserstack-env.js:1281–1287  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

1279 return url;
1280 }
1281 function parseOrigin(url) {
1282 url = parseURL(url);
1283 if (url.pathname !== "/" || url.search || url.hash) {
1284 throw new InvalidArgumentError("invalid url");
1285 }
1286 return url;
1287 }
1288 function getHostname(host) {
1289 if (host[0] === "[") {
1290 const idx2 = host.indexOf("]");

Callers 2

addUpstreamMethod · 0.70
removeUpstreamMethod · 0.70

Calls 1

parseURLFunction · 0.70

Tested by

no test coverage detected