MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / normalizeGraphPath

Function normalizeGraphPath

src/tools/search-codebase.ts:310–319  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

308 }
309
310 function normalizeGraphPath(filePath: string): string {
311 const normalized = filePath.replace(/\\/g, '/');
312 if (path.isAbsolute(filePath)) {
313 const rel = path.relative(ctx.rootPath, filePath).replace(/\\/g, '/');
314 if (rel && !rel.startsWith('..')) {
315 return rel;
316 }
317 }
318 return normalized.replace(/^\.\//, '');
319 }
320
321 function normalizeSymbolName(value: string): string {
322 return value.trim().toLowerCase();

Callers 5

handleFunction · 0.85
getMemoryScopeBoostFunction · 0.85
computeImpactCandidatesFunction · 0.85
getImportedByCountFunction · 0.85
getTopExportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected