A simple and consistent library for dealing with JavaScript money and currency in a browser & Node.js.
import { Mint, USD } from '@bloombug/money';
const { Money } = new Mint();
const wallet = Money();
//=> Money { amount: 0, currency: 'USD' }
const payment = Money(100, USD);
//=> Money { amount: 100, currency: 'USD' }
wallet.add(payment);
//=> Money { amount: 100, currency: 'USD' }
npm install @bloombug/money --save
yarn add @bloombug/money
See docs site for more details, API, and other docs.