Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
cc63dee71e78c947462b026f98107d3a4f3c5d8a
/
.
/
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
}