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

API - unformat: RegExp constructor call malformed #194

Closed ugitch closed 2 years ago

ugitch commented 6 years ago

Flags should be delivered in format of string, not as array of strings. It is clearly explained here. It doesn't throw an error, because there is single element in the array and Java Engine returns toString() value of flags. If it were more elements in the array, that would lead to SyntaxError.

Thanks to @gordonmzhu, for spotting it!