This adds support for passing a Quantity-compatible Item to the Quantity factory and all methods which accept a Quantity as argument (e.g. add, subtract) and also allows to pass Items holding number states to the divide and multiply methods.
The library therefore detects the type of an Item's state and creates either a BigDecimal or a QuantityType from it.
Unit tests were also cleaned-up and the jest setup was moved to an extra file.
This adds support for passing a Quantity-compatible Item to the
Quantity
factory and all methods which accept aQuantity
as argument (e.g. add, subtract) and also allows to pass Items holding number states to the divide and multiply methods. The library therefore detects the type of an Item's state and creates either a BigDecimal or a QuantityType from it.Unit tests were also cleaned-up and the jest setup was moved to an extra file.