osrec/currencyFormatter.js

Missing ES6 feature transpile

cat2608 opened this issue · 1 comments

Hi, thanks for the library :)

I would like to know if you could transpile it to ES5. I'm getting an error because of this line:

return Math.abs(Number(str.replace(new RegExp(`[^0-9${decimal}]`, 'g'), '').replace(decimal, '.'))) * mult;

That happens when I run webpack -p so UglifyJS breaks

I've added some changes to be able to use ES6 in this PR #15 in the future. Thanks :)

osrec commented

Added in version 2.1.0 - thanks very much for the pull request :)