You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no possibility to set up a custom rounding function. Therefore you are limited to the ones that are implemented by default. For my case I need a rounding function that always rounds up (e.g. 0.002 => 0.01 with precision 2, commercial rounding)
It would be nice to pass a callback or a string that describes the rounding mode. If it is a string and the string matches the supported ones, the matching function gets executed. If it is a callback, the callback gets executed.
The text was updated successfully, but these errors were encountered:
Hey there! I just released Dinero.js v2 in alpha, and you no longer need to pass a rounding function when performing mutations.
You can still pass a rounding mode when formatting with toUnit or toFormat, and the library provides rounding functions for convenience. You can pass your own if you want to.
Currently there is no possibility to set up a custom rounding function. Therefore you are limited to the ones that are implemented by default. For my case I need a rounding function that always rounds up (e.g. 0.002 => 0.01 with precision 2, commercial rounding)
It would be nice to pass a callback or a string that describes the rounding mode. If it is a string and the string matches the supported ones, the matching function gets executed. If it is a callback, the callback gets executed.
The text was updated successfully, but these errors were encountered: