Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
599501055fd86684e3ebe852102382de6a3545b6
/
.
/
src
/
utils
/
listToAndMore.ts
blob: 791ce40977d95812811e90c55a9dd7826c28e07d [
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
(
", "
);
}