MCPcopy
hub / github.com/ampproject/amphtml / isLocalhostOrigin

Function isLocalhostOrigin

src/url.js:390–392  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

388 * @return {boolean}
389 */
390export function isLocalhostOrigin(url) {
391 return urls.localhostRegex.test(urlAsLocation(url).origin);
392}
393
394/**
395 * @param {string} uri

Callers 3

testLocalhostOriginFunction · 0.90
constructorMethod · 0.90
getA2AAncestorFunction · 0.90

Calls 2

urlAsLocationFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected