Skip to content

API reference / @localizer/format-number / currencyCodeFormatter

Function: currencyCodeFormatter()

currencyCodeFormatter<T>(options?): ValueFormatter<T>

Defined in: currencyCodeFormatter.ts:33

Creates a formatter to extract the currency symbol from a currency code.

Type Parameters

Type ParameterDescription
T extends CurrencyCodeThe currency code type.

Parameters

ParameterTypeDescription
options?NumberFormatOptionsOptional formatting options.

Returns

ValueFormatter<T>

A ValueFormatter that maps a currency code to its symbol.