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