MCPcopy Create free account
hub / github.com/Qinbf/groundmap / normalizeAbsToRel

Function normalizeAbsToRel

tools/debug-console/lib/build-flow-graph.ts:222–226  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

220}
221
222function normalizeAbsToRel(p: string): string {
223 const m = p.match(/\/(wiki|raw|my_thoughts|exports)\/(.+)$/);
224 if (m) return `${m[1]}/${m[2]}`;
225 return p.replace(/\\/g, "/").replace(/^\.?\/+/, "");
226}
227
228function basename(p: string): string {
229 const seg = p.split("/").pop() || p;

Callers 1

classifyCallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected