(path: string)
| 50 | * Convert the path `path` to a `PathSegment`, throwing an error if it's not a relative path. |
| 51 | */ |
| 52 | export function relativeFrom(path: string): PathSegment { |
| 53 | const normalized = normalizeSeparators(path); |
| 54 | if (fs.isRooted(normalized)) { |
| 55 | throw new Error(`Internal Error: relativeFrom(${path}): path is not relative`); |
| 56 | } |
| 57 | return normalized as PathSegment; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Static access to `dirname`. |
no test coverage detected
searching dependent graphs…