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

Function stripQueryAndHash

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

Source from the content-addressed store, hash-verified

39}
40
41function stripQueryAndHash(url = "") {
42 const q = url.split("?")[0];
43 const [p, hash] = q.split("#");
44 return { path: p, hash: hash || "" };
45}
46
47function isInternalDocLink(url = "") {
48 if (!url) return false;

Callers 2

isInternalDocLinkFunction · 0.85
toTargetRelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected