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