Understand Dinero.js functional API design
add(d1, d2)) rather than chainable methods (e.g., d1.add(d2)). This design choice ensures modularity and allows modern bundlers to perform effective tree-shaking, eliminating unused operations from the final bundle. In contrast, a prototype-based method approach would force every Dinero object to carry all available operations regardless of whether they are used.// Functional style used by Dinero.js
add(d1, d2);