2 ms·
There are libraries, such as Dinero.JS [0] or Decimal.js (handles decimals as strings). Alternatively, don't use decimals and always convert everything to cents
by dsego 7y ago
There are libraries, such as Dinero.JS [0] or Decimal.js (handles decimals as strings). Alternatively, don't use decimals and always convert everything to cents.
[0]https://frontstuff.io/how-to-handle-monetary-values-in-javascript https://frontstuff.io/how-to-handle-monetary-values-in-javas...