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