I have to display monetary values in my view, but it is appearing without formatting. For example, 5.4237
should be displayed as R$ 5,42
, but I do not know how to format this value using Jade with node.js .
I need the value to be saved in the system as a pure, unformatted number because that number is used in calculations that would lose accuracy if saved only with two decimal places. However, to display the value on the screen I do not need the other decimal places, so I think the best way is to format the value when it is shown to the user.
How do I format these monetary values in jade?