by tudorconstantin · 8y ago · 0 comments
For whoever says "you don't manipulate money in js", there's nodejs and many devs actually have to manage them.
I've used the following library in the past:
* https://mikemcl.github.io/bignumber.js/
It's also worth noting that the maximum integer value that can be safely stored by the Number type in JavaScript is 2^53 (9007199254740992). So if you expect to be working with integers larger than this, you should use a library for working with large integers (private keys in cryptocurrencies). The one linked above works, but there are others as well.