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