(nameOrPath: string)
| 96 | |
| 97 | /** Display title from a database folder name/path (strips the `.base` suffix). */ |
| 98 | export function formTitleFromDir(nameOrPath: string): string { |
| 99 | const name = lastSegment(nameOrPath) |
| 100 | return name.toLowerCase().endsWith(FORM_DIR_SUFFIX) |
| 101 | ? name.slice(0, -FORM_DIR_SUFFIX.length) |
| 102 | : name |
| 103 | } |
| 104 | |
| 105 | /** Display title from a database's `data.csv` path. */ |
| 106 | export function formTitleFromCsvPath(csvPath: string): string { |
no test coverage detected