Tagged currency
7 capabilities
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
addMoney in TypeScript
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4:
compareMoney, minMoney, maxMoney, clampMoney
money.convert
Convert an amount to another currency at a supplied exact rate, with an explicit rounding mode.
convertMoney in TypeScript
money.currency-digits
How many decimal places a currency's minor unit has, from the ISO 4217 list.
currencyDigits in TypeScript
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
formatMoney in TypeScript
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parseMoney in TypeScript