blob: 48b889c37fe35dd62e41fe19173ee66db89a8e0b [file] [log] [blame]
pineafane625d782022-05-09 18:04:32 +01001function addPlural(amount: any, unit: string) {
pineafan73a7c4a2022-07-24 10:38:04 +01002 amount = amount.toString();
pineafane625d782022-05-09 18:04:32 +01003 if (amount === '1') return `${amount} ${unit}`
4 return `${amount} ${unit}s`
5}
6
7export default addPlural;