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) | ||||
3 | if(list.length > max) { | ||||
4 | return list.slice(0, max).join(", ") + ` (and ${list.length - max} more)`; | ||||
5 | } | ||||
6 | return list.join(", "); | ||||
7 | } |