formatQuantity MethodStatic
Format a quantity value into a single text string based on the current format specification of this class.
formatQuantity(magnitude: number, spec: FormatterSpec): string
| Parameter | Type | Description |
|---|---|---|
| magnitude | number | defines the value to spec.format. |
| spec | FormatterSpec | A FormatterSpec object the defines specification for the magnitude and unit conversions for the formatter. |
Returns - string
Defined in
- quantity/src/Formatter/Formatter.ts Line 440
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.