Gitiles
Code Review
Sign In
git.clicks.codes
/
Clicks
/
Nucleus
/
719d2e2aa4b7c87c3d1ffd7d2dc962d700770c69
/
.
/
src
/
utils
/
plurals.ts
blob: 9cb16a088fe30299b3accf769e5819241da02c51 [
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
;