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