Come on, we already have this, why did you do this?
Becuase... ES6 and modern browser features and I hate bloat?
What version of NodeJS did you write this in mind?
14, so it does have the 64-bit BigInt functions. While this thing can be used in browsers that don't have BigInts, errors will be thrown if you attempt to use those function in such an enviroment.