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

Setting for default value for "unformat" when the input is invalid / none / blank? #51

Open hllau opened 11 years ago

hllau commented 11 years ago

Is there any way I can set the default value, when the input is NaN? At the moment, it spit out "0" which may not be desired all the time.

Lakshmi-Sharma commented 8 years ago

Pull request #122 should fix this. Is takes in an 'invalid value' parameter.

accounting.unformat('what', ',' , null) = null