@bloombug/money
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @bloombug/money

Weekly Downloads

47

Version

4.1.0

License

MIT

Unpacked Size

584 kB

Total Files

218

Last publish

Collaborators

  • macdonaldr93