StutzJS
- Solves the accuracy problems of the accountingjs library (http://openexchangerates.github.io/accounting.js) by using a bigdecimal implementation (credits http://mikemcl.github.io/big.js) instead of floatingpoint.
- supports typescript by providing an ambient typings file
Getting started
Import the stutz script by adding a script tag in the html header:
Or by adding an npm dependency
npm install stutzjs --save
Format values
var stutz = money;var formattedMoney = stutz; // "CHF 1'234'654'987.12"
Parse formatted values
var stutz = money;console; // "1234654987.120" console; // "CHF"
see Demo for all configuration options.