Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
31d438fb2ad8891bcc34fae78e2b4ca200ee6b04
/
.
/
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
(
", "
);
}