UNPKG

money-lib

Version:

TypeScript library to work with money

16 lines (13 loc) 339 B
import { money } from "../dist/index.js"; money("100 eur") .add("€57.95") .sub(7.99) .add("4 cents") .debug() // money: { cents: 15000, currency: 'EUR' } .mul(5.56399) .div(1) .fmt(); // €834,60 ` eb437fd (HEAD -> main) Update examples 57cdcd4 (origin/main) Add support for values in cents in string template inputs `;