Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
bd02b4a18fec04f26fdc0beaf19e2f2e763e426d
/
.
/
src
/
utils
/
plurals.ts
blob: 619ced2dc7c84f30ba5db66a4c6e482bbba33fbe [
file
] [
log
] [
blame
]
function
addPlural
(
amount
:
number
|
string
,
unit
:
string
)
{
amount
=
amount
.
toString
();
if
(
amount
===
"1"
)
return
`${amount} ${unit}`
;
return
`${amount} ${unit}s`
;
}
export
default
addPlural
;