diff options
Diffstat (limited to 'src/lib/i18n.ts')
-rw-r--r-- | src/lib/i18n.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/i18n.ts b/src/lib/i18n.ts index cd5b3de..3716367 100644 --- a/src/lib/i18n.ts +++ b/src/lib/i18n.ts @@ -1,4 +1,9 @@ -export function unit(n: number, singular: string, plural: string, f: (n: number, unit: string) => string = format): string { +export function unit( + n: number, + singular: string, + plural: string, + f: (n: number, unit: string) => string = format +): string { return n > 1 ? f(n, plural) : f(n, singular) |