(
count: number,
{ singular, plural }: { singular: string; plural: string },
{ includeCount = true } = {}
)
| 1 | export function formatPlural( |
| 2 | count: number, |
| 3 | { singular, plural }: { singular: string; plural: string }, |
| 4 | { includeCount = true } = {} |
| 5 | ) { |
| 6 | const word = count === 1 ? singular : plural |
| 7 | |
| 8 | return includeCount ? `${count} ${word}` : word |
| 9 | } |
| 10 | |
| 11 | export function formatPrice(amount: number, { showZeroAsNumber = false } = {}) { |
| 12 | const formatter = new Intl.NumberFormat(undefined, { |
no outgoing calls
no test coverage detected