Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
*/
390
export
function
isLocalhostOrigin(url) {
391
return
urls.localhostRegex.test(urlAsLocation(url).origin);
392
}
393
394
/**
395
* @param {string} uri
Callers
3
testLocalhostOrigin
Function · 0.90
constructor
Method · 0.90
getA2AAncestor
Function · 0.90
Calls
2
urlAsLocation
Function · 0.85
test
Method · 0.45
Tested by
no test coverage detected