Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 821 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 821 Bytes

@bloombug/money

NPM npm bundle size (scoped)

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.

Examples

View examples