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