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

Method normalize

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

Source from the content-addressed store, hash-verified

4037 opts: { offset?: number; limit?: number; symbolsOnly?: boolean } = {},
4038 ): Promise<ToolResult> {
4039 const normalize = (p: string) => p.replace(/\\/g, '/').replace(/^(?:\.?\/+)+/, '').replace(/\/+$/, '');
4040 const wantLower = normalize(fileArg).toLowerCase();
4041 const allFiles = cg.getFiles();
4042 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