Separate out the pluralise utility function

This commit is contained in:
Maciej Pędzich 2024-04-29 21:16:37 +02:00
parent 2d2965322f
commit cabb90843d
Signed by: maciejpedzich
GPG Key ID: CE4A303D84882F0D

2
src/utils/pluralise.ts Normal file
View File

@ -0,0 +1,2 @@
export const pluralise = (word: string, num: number) =>
num + ' ' + word + (num > 1 ? 's' : '');