TheCodedProf | 1f67504 | 2023-02-16 17:01:29 -0500 | [diff] [blame] | 1 | export default (list: string[], max: number) => { |
2 | // PineappleFan, Coded, Mini (and 10 more) | ||||
Skyler Grey | da16adf | 2023-03-05 10:22:12 +0000 | [diff] [blame] | 3 | if (list.length > max) { |
TheCodedProf | 1f67504 | 2023-02-16 17:01:29 -0500 | [diff] [blame] | 4 | return list.slice(0, max).join(", ") + ` (and ${list.length - max} more)`; |
5 | } | ||||
6 | return list.join(", "); | ||||
Skyler Grey | da16adf | 2023-03-05 10:22:12 +0000 | [diff] [blame] | 7 | }; |