MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / normalizePathForConfigKey

Function normalizePathForConfigKey

src/utils/path.ts:174–180  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

172 * @returns The normalized path with consistent forward slashes
173 */
174export function normalizePathForConfigKey(path: string): string {
175 // First use Node's normalize to resolve . and .. segments
176 const normalized = normalize(path)
177 // Then convert all backslashes to forward slashes for consistent JSON keys
178 // This is safe because forward slashes work in Windows paths for most operations
179 return normalized.replace(/\\/g, '/')
180}

Callers 5

path.test.tsFile · 0.90
isPathTrustedFunction · 0.85
config.tsFile · 0.85
readAuthorityFileFunction · 0.85

Calls 1

normalizeFunction · 0.50

Tested by

no test coverage detected