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

Function isValidPort

github-actions/browserstack/set-browserstack-env.js:1228–1231  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

1226 return url;
1227 }
1228 function isValidPort(port) {
1229 const value = parseInt(port, 10);
1230 return value === Number(port) && value >= 0 && value <= 65535;
1231 }
1232 function isHttpOrHttpsPrefixed(value) {
1233 return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":");
1234 }

Callers 1

parseURLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected