(value: string, max: number)
| 25 | } |
| 26 | |
| 27 | export function truncate(value: string, max: number): string { |
| 28 | if (value.length <= max) return value |
| 29 | return value.slice(0, max - 1).trimEnd() + '…' |
| 30 | } |
| 31 | |
| 32 | export function formatRelativeAge(updatedAt: number): string { |
| 33 | const diff = Date.now() - updatedAt |
no outgoing calls
no test coverage detected