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