API reference / @localizer/format-number / unitFormatter
Function: unitFormatter()
unitFormatter<
T>(options?):UnitValueFormatter<T,Unit>
Defined in: unitFormatter.ts:33
Creates a formatter for localized unit values.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends number | bigint | The type of values to format (number or bigint). |
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | NumberFormatOptions | Optional formatting options. |
Returns
A UnitValueFormatter for localized unit strings.