MCPcopy
hub / github.com/codeaashu/claude-code / normalizePathForConfigKey

Function normalizePathForConfigKey

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

Source from the content-addressed store, hash-verified

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

Callers 3

isPathTrustedFunction · 0.85
config.tsFile · 0.85

Calls 1

normalizeFunction · 0.50

Tested by

no test coverage detected