(value, max)
| 109 | return detail.entries.filter((entry) => statuses.has(entry.status)).length; |
| 110 | } |
| 111 | |
| 112 | function truncate(value, max) { |
| 113 | const text = String(value || '').replace(/\s+/g, ' ').trim(); |
| 114 | if (text.length <= max) return text; |
| 115 | return `${text.slice(0, Math.max(0, max - 3))}...`; |
| 116 | } |
| 117 | |
| 118 | function relativeTime(timestamp, now = new Date()) { |
no outgoing calls
no test coverage detected