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

formatNumber #153

Closed ainasiart closed 7 years ago

ainasiart commented 7 years ago

formatNumber must have the second parameter when setting is in european number I'd like to remove trailing 0 in decimal even the rounding is more than 0 eg: accounting.formatNumber(2.57102, 2) //---> 2.57 accounting.formatNumber(2.1, 2) //---> 2.1 instead of 2.10

karimcossutti commented 7 years ago

That's not how currency should be formatted and i would not expect this library to support it.

ainasiart commented 7 years ago

I'm talking about formatNumber, not formatCurrency