openexchangerates / accounting.js

A lightweight JavaScript library for number, money and currency formatting - fully localisable, zero dependencies.
http://openexchangerates.github.io/accounting.js
MIT License
4.95k stars 528 forks source link

default value for unformat #98

Open samzilverberg opened 9 years ago

samzilverberg commented 9 years ago
accounting.unformat('0') = 0
accounting.unformat('what') = 0

would be nice to be able to pass in a default value for invalid: example:

accounting.unformat('0,00' ',', null) = 0
accounting.unformat('what', ',' , null) = null
spidergears commented 8 years ago

I am looking into this.