Convert Decimaljs to fixed string without trailing zeros
MylesWardell opened this issue · 1 comments
MylesWardell commented
I would like to avoid converting my numbers to JS numbers ever but I don't want to add regex to every request where the user sees the number to clear trailing zeros. Could we add a round option or new chain option that converts the decimal to string without trailing zeros?
Example of what I am showing the user. I am not a fan of any of these solutions https://stackoverflow.com/questions/3612744/remove-insignificant-trailing-zeros-from-a-number
MylesWardell commented
.toDecimalPlaces().toString()
Just saw the previously closed issue. Closing 👍