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

Method normalize

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

Source from the content-addressed store, hash-verified

3868 opts: { offset?: number; limit?: number; symbolsOnly?: boolean } = {},
3869 ): Promise<ToolResult> {
3870 const normalize = (p: string) => p.replace(/\\/g, '/').replace(/^(?:\.?\/+)+/, '').replace(/\/+$/, '');
3871 const wantLower = normalize(fileArg).toLowerCase();
3872 const allFiles = cg.getFiles();
3873 if (allFiles.length === 0) return this.textResult('No files indexed. Run `codegraph index` first.');

Callers 6

emitRubyRequireRefsMethod · 0.80
resolveViaImportFunction · 0.80
resolveIncludeFunction · 0.80
normalizeRelFunction · 0.80
normalizeProseWordFunction · 0.80
normalizeIndexPathFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected