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