MCPcopy Create free account
hub / github.com/pingcap/docs-cn / isExternalUrl

Function isExternalUrl

scripts/verify-internal-links-in-toc.js:35–39  ·  view source on GitHub ↗
(url = "")

Source from the content-addressed store, hash-verified

33const sortByLocale = (left, right) => left.localeCompare(right);
34
35function isExternalUrl(url = "") {
36 return (
37 url.startsWith("//") || url.includes("://") || url.startsWith("mailto:")
38 );
39}
40
41function stripQueryAndHash(url = "") {
42 const q = url.split("?")[0];

Callers 1

isInternalDocLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected