parseToQuantityValue MethodStatic
Deprecated in 4.10. Check parseQuantityString for replacements.
Method to generate a Quantity given a string that represents a quantity value and likely a unit label.
parseToQuantityValue(inString: string, format: Format, unitsConversions: UnitConversionSpec[]): QuantityParseResult
Parameter | Type | Description |
---|---|---|
inString | string | A string that contains text represent a quantity. |
format | Format | Defines the likely format of inString. Primary unit serves as a default unit if no unit label found in string. |
unitsConversions | UnitConversionSpec[] | dictionary of conversions used to convert from unit used in inString to output quantity |
Returns - QuantityParseResult
Defined in
- quantity/src/Parser.ts Line 678
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.