(path: string)
| 1269 | } |
| 1270 | |
| 1271 | function basename(path: string): string { |
| 1272 | const trimmed = path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path; |
| 1273 | const index = trimmed.lastIndexOf("/"); |
| 1274 | return index === -1 ? trimmed : trimmed.slice(index + 1); |
| 1275 | } |
| 1276 | |
| 1277 | function isEnoent(err: unknown): boolean { |
| 1278 | if (!err || typeof err !== "object") return false; |
no outgoing calls
no test coverage detected