I recently had a project where this was exactly the package that I needed but it was missing some functionality. What I needed was the ability to zero pad monetary values to a specified number of decimal places. So I could take something like this:
The function that I added was called decimalPad and operated similar to rightPad but checked for the presence of a decimal place and then added the specified number of 0s required. If anyone else feels this type of feature would be useful, I'd be happy to make it a little more rigorous and put in a PR.
Hey Jolt team,
I recently had a project where this was exactly the package that I needed but it was missing some functionality. What I needed was the ability to zero pad monetary values to a specified number of decimal places. So I could take something like this:
{ "bookValue": "123.4", "interestRate": "0.1" }
and convert it to
{ "bookValue": "123.40", "interestRate": "0.10000" }
The function that I added was called decimalPad and operated similar to rightPad but checked for the presence of a decimal place and then added the specified number of 0s required. If anyone else feels this type of feature would be useful, I'd be happy to make it a little more rigorous and put in a PR.