All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- New money factories for VED currency
- Updated production dependencies to latest patch releases
- Improved typing of generated factory methods
- New 'roundWithDelta' method to the MoneyRounder class that provides not just the rounded amount but also the delta between the original amount and the rounded amount.
These changes should hopefully not have any impact on consumers of the library.
- Updated internal method call for subtracting percentages to be more direct.
- Moved to using
import type
in as many places as possible.
Updated typescript and other dependencies, including the Typescript compiler. There were also some type safety improvements that should make life easier for users of this package.
Updated typescript and other dependencies, including the Typescript compiler to improve strictness. Otherwise no changes to API or ABI, just formalising the current code as a full 1.0 release!
Releases are now compiled as proper ES Modules. This was always the intention, I just didn't know any better to make it happen. Using ES Modules ensures friendliness with tree-shaking.
This release should basically be considered a release candidate for 1.0.0
. There are no changes
planned at this point.
- A couple of interfaces have been moved to the general package
@cashmoney/iso-currency-contracts
. - A few error messages have been adjusted slightly.
- The symbol money parser now actually works.
- Some minor adjustments to error messages.
- Service classes are stricter about keeping their settings immutable.
- A new "trim trailing zeroes" flag is now available in the Bitcoin money formatter.
- Cash rounder class, for when you're handling cash with denominations greater than 1 subunit.
- Rounding method for
RoundedMoney
, to allow even more rounding.
- Typescript has been updated. Some dependencies already use Typescript 3.8 functionality, and in future CashMoney will too.
- An "oops" fix for the new method in
0.7.0
.
RoundedMoney
gained asubtractPercentageAndRound
method.
- The ISO Currency List class has been updated to integrate with the
@cashmoney/iso-currencies
package.
- A static factory method named
fromArray
has been added to bothPreciseMoney
andRoundedMoney
. RoundedMoney
gained the following methods:multiply
,multiplyAndRound
,divide
,divideAndRound
,percentage
,subtractPercentage
.
- Calling
toJSON
onCurrencyPair
objects directly (as opposed to through ``JSON.stringify) will now return currency codes, not currency objects.