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