I wish you could add different currencies together: Dinero({amount: 5000, currency: 'USD'}) .add(Dinero({ amount: 1000, currency: 'EUR'})) ...and then convert that sum to a concrete currency later. This feature request inspired by http://blog.ploeh.dk/2017/10/16/money-monoid/
How would you deal with exchange rate, which changes in real time?
If you’re keeping these values around in memory for an extended period of time time and you care about rapid changes to exchange rates, then you have a complex domain and the deferred exchanges may or may not be a good fit, but at that point you need larger system design, not a JavaScript library.
Also in my dream money library, division and multiplication would be done with whole number fractions like
new Dinero({amount: 1000, currency: ‘usd’})
.multiply({numerator: 1, denominator: 3 })
which can similarly be deferred to prevent rounding errors in partial calculations.