Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
a239d1c1340ab66594ded5704f3bcee680e3a6a0
/
.
/
src
/
utils
/
ellipsis.ts
blob: 6ec5888abbf93dffd6fcfc7b86617df9998143f0 [
file
] [
log
] [
blame
]
Samuel Shuert
27bf3cd
2023-03-03 15:51:25 -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
}