api
api copied to clipboard
Provide formatted money values
Hey guys
Without doing more regex magic as I mentioned previously, perhaps a prettyValue
key would be nice for transactions.
Currently I have setup to use $-1.00
however in app it uses -$1.00
. An if and strip could obviously resolve this but, just for expansions sake?
https://upbank.netlify.app/activity
This is one reason we expose the value
, valueInBaseUnits
along with the currencyCode
(it maps nicely to money libraries designed to deal with currency), but providing a formatted example is certainly an interesting idea for use cases where the value isn't needed for any arithmetic type operations and purely for display 🤔