Overview
Theformat-number transformation formats a number according to the specified style, locale, and decimal options.
Syntax
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
variable | number | Yes | The number to format |
style | string | Yes | Formatting style: "decimal", "percent", or "unit" |
unit | string | No | The unit to use when style is "unit" (e.g., "kilometer", "celsius") |
locale | string | No | The locale for formatting (e.g., "en-US", "fr-FR"). Defaults to "en-US" |
minDecimal | number | No | Minimum number of decimal places |
maxDecimal | number | No | Maximum number of decimal places |