commit | e625d7897697e56a174737d358593f5f3f21f8b7 | [log] [tgz] |
---|---|---|
author | pineafan <pineapplefanyt@gmail.com> | Mon May 09 18:04:32 2022 +0100 |
committer | pineafan <pineapplefanyt@gmail.com> | Mon May 09 18:04:32 2022 +0100 |
tree | 9de52d1e958d4043afbadf21029c24c885b2ea7a | |
parent | ad54d7551e482a1558d96828d3f33ea1ce701534 [diff] [blame] |
few changes
diff --git a/src/utils/plurals.ts b/src/utils/plurals.ts new file mode 100644 index 0000000..f956057 --- /dev/null +++ b/src/utils/plurals.ts
@@ -0,0 +1,6 @@ +function addPlural(amount: any, unit: string) { + if (amount === '1') return `${amount} ${unit}` + return `${amount} ${unit}s` +} + +export default addPlural; \ No newline at end of file