MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / normalizeWorkspacePath

Function normalizeWorkspacePath

graph-ui/src/app/module-qn.ts:36–45  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

34
35/** Ein Pfad ohne fuehrenden Schraegstrich und ohne `./`. */
36export function normalizeWorkspacePath(path: string): string {
37 let value = path.trim().replace(/\\/g, '/');
38 while (value.startsWith('./')) {
39 value = value.slice(2);
40 }
41 while (value.startsWith('/')) {
42 value = value.slice(1);
43 }
44 return value;
45}
46
47/**
48 * Der Pfad ohne seine letzte Endung.

Callers 5

loadFileDocumentFunction · 0.90
module-qn.test.tsFile · 0.90
moduleQualifiedNameFunction · 0.85
fileQualifiedNameFunction · 0.85
pathSegmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected