MCPcopy Create free account
hub / github.com/Effect-TS/effect / _format

Function _format

packages/effect/src/Path.ts:337–347  ·  view source on GitHub ↗
(sep: string, pathObject: Partial<Path.Parsed>)

Source from the content-addressed store, hash-verified

335}
336
337function _format(sep: string, pathObject: Partial<Path.Parsed>) {
338 const dir = pathObject.dir || pathObject.root
339 const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "")
340 if (!dir) {
341 return base
342 }
343 if (dir === pathObject.root) {
344 return dir + base
345 }
346 return dir + sep + base
347}
348
349function fromFileUrl(url: URL): Effect.Effect<string, BadArgument> {
350 if (url.protocol !== "file:") {

Callers 1

Path.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected