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

Function buildURL

github-actions/browserstack/set-browserstack-env.js:1218–1227  ·  view source on GitHub ↗
(url, queryParams)

Source from the content-addressed store, hash-verified

1216 }
1217 }
1218 function buildURL(url, queryParams) {
1219 if (url.includes("?") || url.includes("#")) {
1220 throw new Error('Query params cannot be passed when url already contains "?" or "#".');
1221 }
1222 const stringified = stringify(queryParams);
1223 if (stringified) {
1224 url += "?" + stringified;
1225 }
1226 return url;
1227 }
1228 function isValidPort(port) {
1229 const value = parseInt(port, 10);
1230 return value === Number(port) && value >= 0 && value <= 65535;

Callers 2

constructorMethod · 0.70
getMockDispatchFunction · 0.70

Calls 1

stringifyFunction · 0.70

Tested by

no test coverage detected