(modulePath: string)
| 101 | * when the path's last segment is only dots. |
| 102 | */ |
| 103 | export function moduleTail(modulePath: string): string { |
| 104 | const stem = pathStem(modulePath); |
| 105 | return stem ? MODULE_KEY + stem : ''; |
| 106 | } |
| 107 | |
| 108 | /** A path's last segment up to its first dot — `./pages/Team` → 'Team', `a/b.dart` → 'b' — or '' when that is only dots. */ |
| 109 | function pathStem(path: string): string { |
no test coverage detected