(path: string)
| 50 | } |
| 51 | |
| 52 | function isAbsoluteOrProtocolPath(path: string): boolean { |
| 53 | return ( |
| 54 | path.startsWith("/") || |
| 55 | /^[A-Za-z]:[\\/]/.test(path) || |
| 56 | path.startsWith("\\\\") || |
| 57 | /^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(path) |
| 58 | ); |
| 59 | } |
| 60 | |
| 61 | function getDirName(path: string): string { |
| 62 | const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); |
no outgoing calls
no test coverage detected