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