MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / normalizePathForConfigKey

Function normalizePathForConfigKey

source code/utils/path.ts:151–157  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

149 * @returns The normalized path with consistent forward slashes
150 */
151export function normalizePathForConfigKey(path: string): string {
152 // First use Node's normalize to resolve . and .. segments
153 const normalized = normalize(path)
154 // Then convert all backslashes to forward slashes for consistent JSON keys
155 // This is safe because forward slashes work in Windows paths for most operations
156 return normalized.replace(/\\/g, '/')
157}

Callers 3

isPathTrustedFunction · 0.85
config.tsFile · 0.85

Calls 1

normalizeFunction · 0.50

Tested by

no test coverage detected