(
amount: number,
additionalOptions: Intl.NumberFormatOptions & MissingNumberFormatOptions = {},
)
| 114 | * Format a number as USD. |
| 115 | */ |
| 116 | export function formatCurrency( |
| 117 | amount: number, |
| 118 | additionalOptions: Intl.NumberFormatOptions & MissingNumberFormatOptions = {}, |
| 119 | ): string { |
| 120 | const formatter = Intl.NumberFormat("default", { |
| 121 | style: "currency", |
| 122 | currency: "USD", |
| 123 | ...additionalOptions, |
| 124 | }); |
| 125 | return formatter.format(amount); |
| 126 | } |
| 127 | |
| 128 | function roundIntervalValue( |
| 129 | valueToRound: number, |
no test coverage detected