(file: string)
| 32 | |
| 33 | /** The folder a project file is in, `/`-separated; '' is the project root. */ |
| 34 | export function folderOf(file: string): string { |
| 35 | const dir = path.posix.dirname(file.replace(/\\/g, '/')); |
| 36 | return dir === '.' ? '' : dir; |
| 37 | } |
| 38 | |
| 39 | /** `folder` and each folder above it, the project root ('') last. */ |
| 40 | function foldersAbove(folder: string): string[] { |
no outgoing calls
no test coverage detected