Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
e15de66a087ae2ddd1c1a34940a0a752adc20709
/
.
/
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
)
+
"..."
;
}