(payload: WireFilePayload)
| 187 | * reader has no way to resolve. |
| 188 | */ |
| 189 | export function fileMetaLine(payload: WireFilePayload): string { |
| 190 | const parts = [payload.file.language, formatBytes(payload.file.size)]; |
| 191 | parts.push(`${payload.outline.total} ${payload.outline.total === 1 ? 'symbol' : 'symbols'}`); |
| 192 | if (payload.file.generated) parts.push('generated'); |
| 193 | if (payload.file.test) parts.push('test'); |
| 194 | return parts.join(' · '); |
| 195 | } |
| 196 | |
| 197 | /** The document title / heading for a file: its basename. */ |
| 198 | export function fileTitle(path: string): string { |
no test coverage detected