MCPcopy
hub / github.com/freshframework/fresh / parseDirPath

Function parseDirPath

packages/fresh/src/config.ts:51–66  ·  view source on GitHub ↗
(
  dirPath: string,
  root: string,
)

Source from the content-addressed store, hash-verified

49}
50
51export function parseDirPath(
52 dirPath: string,
53 root: string,
54): string {
55 if (dirPath.startsWith("file://")) {
56 dirPath = path.fromFileUrl(dirPath);
57 } else if (!path.isAbsolute(dirPath)) {
58 dirPath = path.join(root, dirPath);
59 }
60
61 if (Deno.build.os === "windows") {
62 dirPath = dirPath.replaceAll("\\", "/");
63 }
64
65 return dirPath;
66}

Callers 2

config_test.tsFile · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected