MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / normalize

Method normalize

src/mcp/tools.ts:8716–8716  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

8714 opts: { offset?: number; limit?: number; symbolsOnly?: boolean } = {},
8715 ): Promise<ToolResult> {
8716 const normalize = (p: string) => p.replace(/\\/g, '/').replace(/^(?:\.?\/+)+/, '').replace(/\/+$/, '');
8717 const allFiles = cg.getFiles();
8718 if (allFiles.length === 0) return this.textResult('No files indexed. Run `codegraph index` first.');
8719

Callers 15

extractWebRootFunction · 0.80
resolveGitDirFunction · 0.80
emitRubyRequireRefsMethod · 0.80
pythonImportRootAtFunction · 0.80
relativeDirectoryMainFunction · 0.80
indexedSpellingFunction · 0.80
resolveViaImportFunction · 0.80
expandWorkspaceGlobFunction · 0.80
resolveIncludeFunction · 0.80
pathDependenciesFunction · 0.80
resolveDartUriFunction · 0.80
resolveIncludeFunction · 0.80

Calls

no outgoing calls

Tested by 1

outsideFunction · 0.64