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
When debugging, it's quite difficult to see what's actually going on with my numbers to make sure my math is correct, because there is no visual indication of the number that a Dinero object represents in the debugger. Everything is hidden behind a .toFormat() or .toUnit() function which you can't easily call in dev tools.
Expected behavior
I've already done this locally in my setup, but I thought it would be useful for other users too. I set a getter when creating the object which just shows a preview of the string value. You still need to click it in the dev console to see the amount which isn't ideal, but I wasn't sure if exposing the raw internal values was safe. It might be a good idea to include this in the Dinero source code behind a development environment flag or something.
Is there an existing issue for this?
Current behavior
When debugging, it's quite difficult to see what's actually going on with my numbers to make sure my math is correct, because there is no visual indication of the number that a Dinero object represents in the debugger. Everything is hidden behind a
.toFormat()
or.toUnit()
function which you can't easily call in dev tools.Expected behavior
I've already done this locally in my setup, but I thought it would be useful for other users too. I set a
getter
when creating the object which just shows a preview of the string value. You still need to click it in the dev console to see the amount which isn't ideal, but I wasn't sure if exposing the raw internal values was safe. It might be a good idea to include this in the Dinero source code behind adevelopment
environment flag or something.Steps to reproduce
temp.toFormat()
manually for each oneVersion
1.9.1
Environment
Chrome
Code of Conduct
The text was updated successfully, but these errors were encountered: