Suppose I want to convert a base-36 encoded string to a BigInt
, I can do this:
BigInt(parseInt(x,36))
But what if my string exceeds what can safely fit in a Number? e.g.
parseInt('zzzzzzzzzzzzz',36)
Then I start losing precision.
Are there any methods for parsing directly into a BigInt
?