commit | 1f67504a24a36a169911722c561d2d61ba11e62e | [log] [tgz] |
---|---|---|
author | TheCodedProf <samuel.shuert@gmail.com> | Thu Feb 16 17:01:29 2023 -0500 |
committer | TheCodedProf <samuel.shuert@gmail.com> | Thu Feb 16 17:01:29 2023 -0500 |
tree | ce72d7eb4f53cc46ec3ea0420f1247c98f94ac01 | |
parent | 362c51d71ee909229d8391059cb775b02aadfdec [diff] [blame] |
fixed settings commands, todo's
diff --git a/src/utils/listToAndMore.ts b/src/utils/listToAndMore.ts new file mode 100644 index 0000000..791ce40 --- /dev/null +++ b/src/utils/listToAndMore.ts
@@ -0,0 +1,7 @@ +export default (list: string[], max: number) => { + // PineappleFan, Coded, Mini (and 10 more) + if(list.length > max) { + return list.slice(0, max).join(", ") + ` (and ${list.length - max} more)`; + } + return list.join(", "); +} \ No newline at end of file