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

Method normalize

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

Source from the content-addressed store, hash-verified

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

Callers 15

extractWebRootFunction · 0.80
resolveGitDirFunction · 0.80
emitRubyRequireRefsMethod · 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
underWebRootFunction · 0.80

Calls

no outgoing calls

Tested by 1

outsideFunction · 0.64