(str: string)
| 56 | * Adopted from https://github.com/sindresorhus/slash/blob/main/index.js |
| 57 | */ |
| 58 | export function posixPath(str: string): string { |
| 59 | const isExtendedLengthPath = str.startsWith('\\\\?\\'); |
| 60 | |
| 61 | if (isExtendedLengthPath) { |
| 62 | return str; |
| 63 | } |
| 64 | return str.replace(/\\/g, '/'); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * When you want to display a path in a message/warning/error, it's more |
no outgoing calls
searching dependent graphs…