API reference / @localizer/format-number / relativeCurrencyFormatter
Function: relativeCurrencyFormatter()
relativeCurrencyFormatter<
T>(currency,options?):RelativeValueFormatter<T>
Defined in: relativeCurrencyFormatter.ts:34
Formats values relative to a reference as localized currency strings.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends number | bigint | The numeric type, either number or bigint. |
Parameters
| Parameter | Type | Description |
|---|---|---|
currency | CurrencyCode | The currency code (e.g., 'USD', 'EUR'). |
options? | NumberFormatOptions | Optional formatting options. |
Returns
A function to format a value relative to a reference.