(path: Path)
| 68 | * |
| 69 | */ |
| 70 | export function extname(path: Path): string { |
| 71 | const base = basename(path); |
| 72 | const i = base.lastIndexOf('.'); |
| 73 | if (i < 1) { |
| 74 | return ''; |
| 75 | } else { |
| 76 | return base.slice(i); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Return the basename of the path, as a Path. See path.basename |
no test coverage detected