MCPcopy Create free account
hub / github.com/ampproject/amphtml / isProtocolValid

Function isProtocolValid

src/url.js:424–426  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

422 * @return {boolean}
423 */
424export function isProtocolValid(url) {
425 return !(url && INVALID_PROTOCOLS.includes(urlAsLocation(url).protocol));
426}
427
428/**
429 * Returns a URL without AMP JS parameters.

Callers 1

testProtocolValidFunction · 0.90

Calls 1

urlAsLocationFunction · 0.85

Tested by

no test coverage detected