MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / normalizePath

Function normalizePath

apps/cli/src/lib/utils/path.ts:7–13  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

5 * This handles cross-platform path comparison issues.
6 */
7export function normalizePath(p: string): string {
8 // Remove trailing slashes
9 let normalized = p.replace(/[/\\]+$/, "")
10 // Convert to consistent separators using path.normalize
11 normalized = path.normalize(normalized)
12 return normalized
13}
14
15/**
16 * Compare two paths for equality, handling:

Callers 2

arePathsEqualFunction · 0.70
path.test.tsFile · 0.50

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected