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

Function getHostname

github-actions/browserstack/set-browserstack-env.js:1288–1298  ·  view source on GitHub ↗
(host)

Source from the content-addressed store, hash-verified

1286 return url;
1287 }
1288 function getHostname(host) {
1289 if (host[0] === "[") {
1290 const idx2 = host.indexOf("]");
1291 assert(idx2 !== -1);
1292 return host.substring(1, idx2);
1293 }
1294 const idx = host.indexOf(":");
1295 if (idx === -1)
1296 return host;
1297 return host.substring(0, idx);
1298 }
1299 function getServerName(host) {
1300 if (!host) {
1301 return null;

Callers 1

getServerNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected