(p: string)
| 237 | } |
| 238 | |
| 239 | export function windowsPath(p: string): string { |
| 240 | if (process.platform !== "win32") return p |
| 241 | return p |
| 242 | .replace(/^\/([a-zA-Z]):(?:[\\/]|$)/, (_, drive) => `${drive.toUpperCase()}:/`) |
| 243 | .replace(/^\/([a-zA-Z])(?:\/|$)/, (_, drive) => `${drive.toUpperCase()}:/`) |
| 244 | .replace(/^\/cygdrive\/([a-zA-Z])(?:\/|$)/, (_, drive) => `${drive.toUpperCase()}:/`) |
| 245 | .replace(/^\/mnt\/([a-zA-Z])(?:\/|$)/, (_, drive) => `${drive.toUpperCase()}:/`) |
| 246 | } |
| 247 | |
| 248 | export function overlaps(a: string, b: string) { |
| 249 | return contains(a, b) || contains(b, a) |
no outgoing calls
no test coverage detected