@bloombug/money
v4.1.0
Published
![NPM](https://img.shields.io/npm/l/@bloombug/money) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@bloombug/money)
Downloads
130
Readme
@bloombug/money
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' }
Installation
npm install @bloombug/money --save
yarn add @bloombug/money
Docs
See docs site for more details, API, and other docs.