mirror of
https://github.com/maciejpedzich/six-degs-of-f1.git
synced 2024-11-27 15:55:47 +01:00
Separate out the pluralise utility function
This commit is contained in:
parent
2d2965322f
commit
cabb90843d
2
src/utils/pluralise.ts
Normal file
2
src/utils/pluralise.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export const pluralise = (word: string, num: number) =>
|
||||||
|
num + ' ' + word + (num > 1 ? 's' : '');
|
Loading…
Reference in New Issue
Block a user