Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
1b66963db27b471f3859c31cc1a6da8db1c21943
/
.
/
src
/
utils
/
listToAndMore.ts
blob: 047cbc9adaa76c4a66067f8192d24bdeba9cb212 [
file
] [
log
] [
blame
]
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
(
", "
);
};