Optional
caseWhether to ignore case when matching the unit.
The unit name in the parse result will be kept in the same case as the unit
property.
The format of the string to parse.
Use placeholders {value}
and {unit}
to specify where the value and unit should be.
Optional
maxHow many digits to allow after the decimal point.
The list of units to parse.
If a
string
is provided, it will be converted to an object{ name, aliases: [name] }
.So that the name will also be an alias.
The options for the UnitParser.