Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
a2e39c7ffbb91dc0424c484f86fb508b974239f1
/
.
/
src
/
utils
/
ellipsis.ts
blob: 6ec5888abbf93dffd6fcfc7b86617df9998143f0 [
file
] [
log
] [
blame
]
TheCodedProf
b5e9d55
2023-01-29 15:43:26 -0500
[
diff
] [
blame
]
1
export
default
(
str
:
string
,
max
:
number
):
string
=>
{
2
if
(
str
.
length
<=
max
)
return
str
;
3
return
str
.
slice
(
0
,
max
-
3
)
+
"..."
;
4
}