(names: string[])
| 18 | * Returns null for an empty list so callers can fall through. |
| 19 | */ |
| 20 | export function summarizeNames(names: string[]): string | null { |
| 21 | if (names.length === 0) return null |
| 22 | if (names.length === 1) return names[0] |
| 23 | if (names.length === 2) return `${names[0]}, ${names[1]}` |
| 24 | return `${names[0]}, ${names[1]} +${names.length - 2}` |
| 25 | } |
| 26 | |
| 27 | interface WorkflowTableRow { |
| 28 | id: string |
no outgoing calls
no test coverage detected