(path: string)
| 1263 | } |
| 1264 | |
| 1265 | function dirname(path: string): string { |
| 1266 | const index = path.lastIndexOf("/"); |
| 1267 | if (index <= 0) return "/"; |
| 1268 | return path.slice(0, index); |
| 1269 | } |
| 1270 | |
| 1271 | function basename(path: string): string { |
| 1272 | const trimmed = path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path; |
no outgoing calls
no test coverage detected