Use fromMinor or fromDecimal. Without scale, the currency must be in the table.
Optionalscale: numberReadonlyamountReadonlycurrencyReadonlyscaleStatic ReadonlycurrenciesAll the currency codes in the built-in ISO 4217 table.
True when the currency is the same and the amounts are equal at a common scale.
Writes the amount as a decimal string with scale digits after the point.
Writes the amount and the currency, for example 12.50 USD.
StaticfromMakes a Money from a decimal string, such as "19.99". The scale is the larger of the
digits after the point and the ISO 4217 exponent.
StaticfromMakes a Money from minor units. The scale defaults to the ISO 4217 exponent.
Optionalscale: number
An amount of money.
amountis an integer in units of10 ** -scaleofcurrency. AMoneyis immutable. It does no arithmetic: use dinero or a decimal library for math.