If you run this:
console.log(new BigNumber('123456789012345678901234567890').c);
You can see that numbers are stored as arrays, of maximum 14 digits
So the actual limitation would be the maximum length you can have for an array, multiplied by 14. This depends a lot on your machine, but assuming you have the best machine ever, ECMA-262 v6.0 says the limit is for the length of an array is 2^32-1
, which is the size of ToUint32, so, theoretically, you could store a number with 14 * (2^32-1)
digits using that library, that's something like:
console.log(new BigNumber(2).pow(32).sub(1).mul(14).toString());
Which is something around 60129542130
digits