( dirPath: string, root: string, )
| 49 | } |
| 50 | |
| 51 | export 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 | } |
no outgoing calls
no test coverage detected