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

Unformat returning negative value when '()' appears in input #121

Open Lakshmi-Sharma opened 8 years ago

Lakshmi-Sharma commented 8 years ago
accounting.unformat("ISD(rupee) $100")

Expected result: 100
Actual result: -100

Unformatting any string with brakets ie. (), results in a negative number