(ms: number)
| 225 | } |
| 226 | |
| 227 | export function formatDuration(ms: number): string { |
| 228 | if (ms < 1000) return `${ms}ms` |
| 229 | if (ms < 60000) return `${Math.round(ms / 1000)}s` |
| 230 | return `${Math.round(ms / 60000)}m ${Math.round((ms % 60000) / 1000)}s` |
| 231 | } |
| 232 | |
| 233 | export function formatCurrency(amount: number): string { |
| 234 | if (amount < 0.01) return '<$0.01' |
no outgoing calls
no test coverage detected