(path: string)
| 34 | |
| 35 | /** Ein Pfad ohne fuehrenden Schraegstrich und ohne `./`. */ |
| 36 | export function normalizeWorkspacePath(path: string): string { |
| 37 | let value = path.trim().replace(/\\/g, '/'); |
| 38 | while (value.startsWith('./')) { |
| 39 | value = value.slice(2); |
| 40 | } |
| 41 | while (value.startsWith('/')) { |
| 42 | value = value.slice(1); |
| 43 | } |
| 44 | return value; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Der Pfad ohne seine letzte Endung. |
no outgoing calls
no test coverage detected