parseIntoQuantity MethodStatic
Async method to generate a Quantity given a string that represents a quantity value and likely a unit label.
parseIntoQuantity(inString: string, format: Format, unitsProvider: UnitsProvider, altUnitLabelsProvider?: AlternateUnitLabelsProvider): Promise<QuantityProps>
Parameter | Type | Description |
---|---|---|
inString | string | A string that contains text represent a quantity. |
format | Format | Defines the likely format of inString. |
unitsProvider | UnitsProvider | required to look up units that may be specified in inString |
altUnitLabelsProvider | AlternateUnitLabelsProvider |
Returns - Promise<QuantityProps>
Defined in
- quantity/src/Parser.ts Line 469
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.