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