MCPcopy Create free account
hub / github.com/nodejs/node / urlIsLocal

Function urlIsLocal

deps/undici/undici.js:5788–5792  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

5786 }
5787 __name(readAllBytes, "readAllBytes");
5788 function urlIsLocal(url) {
5789 assert("protocol" in url);
5790 const protocol = url.protocol;
5791 return protocol === "about:" || protocol === "blob:" || protocol === "data:";
5792 }
5793 __name(urlIsLocal, "urlIsLocal");
5794 function urlHasHttpsScheme(url) {
5795 return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:";

Callers 2

stripURLForReferrerFunction · 0.70
mainFetchFunction · 0.70

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected