Global Options
These apply to all sections below unless overridden.
Number
Uses format(value, { style: "number" }).
Currency
Uses format(amount, { style: "currency", currency }).
Percent
Uses format(value, { style: "percent" }).
SI Units
Uses format(value, { style: "si", unit, base }).
Bytes
Uses format(value, { style:"bytes", base, iec, decimals }).
Duration
Uses format(ms, { style:"duration" }, { maxUnits, smallestUnit }).
format(value, options) Playground
currency
unit (SI)
base (SI/bytes)
iec (bytes)
duration.maxUnits
duration.smallestUnit