Skip to content

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 ParameterDescription
T extends number | bigintThe type of values to format (number or bigint).

Parameters

ParameterTypeDescription
options?NumberFormatOptionsOptional formatting options.

Returns

UnitValueFormatter<T, Unit>

A UnitValueFormatter for localized unit strings.