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