mazipan / vue-currency-filter

🍒 Lightweight vue currency filter based on accounting.js
https://mazipan.github.io/vue-currency-filter/
MIT License
246 stars 29 forks source link

Cannot set thousand separator to space #9

Closed oharan closed 6 years ago

oharan commented 6 years ago

I'm having a small problem using your filter with French Canadian. French Canadian uses thousand separator of space, but your filter is setting it to the default because it thinks an empty space is a number.

oharan commented 6 years ago

https://github.com/mazipan/vue-currency-filter/blob/fc9664e9991396b319b207348414ba4f6e89b7e1/VueCurrencyFilter.js#L56

This is the line. If you do !isNaN(parseInt(thousandsSeparator)) it works with a space.

mazipan commented 6 years ago

You can create pull request then, feel free to correcting the code.