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