Fixed unit @localizer/format-number 1.0.1
fixedUnitFormatter<
T
> (unit
,options?
): ValueFormatter<T
>
T
extends number | bigint - The type of value to format.unit
- The measurement unit to use for value formatting.options
- Optional configuration of the formatter.
Use this formatter to display measurements with a predefined unit.
TIP
If the unit is not predetermined, consider using the unit formatter instead. It dynamically adapts to various units, making it a versatile choice for scenarios where the unit type may vary.