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