(raw: unknown)
| 107 | } |
| 108 | |
| 109 | export function readBrowse(raw: unknown): BrowseLevel { |
| 110 | const record = isRecord(raw) ? raw : {}; |
| 111 | return { |
| 112 | path: text(record['path']), |
| 113 | dirs: strings(record['dirs']), |
| 114 | parent: text(record['parent']), |
| 115 | roots: strings(record['roots']), |
| 116 | }; |
| 117 | } |
| 118 | |
| 119 | /** `path` joined with one of its listed folders, without doubling the separator. */ |
| 120 | export function childPath(level: BrowseLevel, dir: string): string { |
no test coverage detected