Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
c2313abb67ee0de7bf7065e151d72a98eb60278d
/
.
/
src
/
utils
/
ellipsis.ts
blob: 6ec5888abbf93dffd6fcfc7b86617df9998143f0 [
file
] [
log
] [
blame
]
export
default
(
str
:
string
,
max
:
number
):
string
=>
{
if
(
str
.
length
<=
max
)
return
str
;
return
str
.
slice
(
0
,
max
-
3
)
+
"..."
;
}