MCPcopy Create free account
hub / github.com/effect-app/libs / normalize

Function normalize

repos/effect/packages/effect/src/Path.ts:483–497  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

481 if (path.length === 0) return "."
482
483 const isAbsolute = path.charCodeAt(0) === 47 /*/*/
484 const trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/
485
486 // Normalize the path
487 path = normalizeStringPosix(path, !isAbsolute)
488
489 if (path.length === 0 && !isAbsolute) path = "."
490 if (path.length > 0 && trailingSeparator) path += "/"
491
492 if (isAbsolute) return "/" + path
493 return path
494 },
495
496 isAbsolute(path) {
497 return path.length > 0 && path.charCodeAt(0) === 47 /*/*/
498 },
499
500 join() {

Callers

nothing calls this directly

Calls 1

normalizeStringPosixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…