blob: 047cbc9adaa76c4a66067f8192d24bdeba9cb212 [file] [log] [blame]
TheCodedProf1f675042023-02-16 17:01:29 -05001export default (list: string[], max: number) => {
2 // PineappleFan, Coded, Mini (and 10 more)
Skyler Greyda16adf2023-03-05 10:22:12 +00003 if (list.length > max) {
TheCodedProf1f675042023-02-16 17:01:29 -05004 return list.slice(0, max).join(", ") + ` (and ${list.length - max} more)`;
5 }
6 return list.join(", ");
Skyler Greyda16adf2023-03-05 10:22:12 +00007};