tc39 / proposal-bigint-math

Draft specification for supporting BigInts in JavaScript’s Math methods.

Home Page:https://tc39.es/proposal-bigint-math/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse string to BigInt with radix?

sffc opened this issue · comments

Current APIs:

  • parseInt() parses strings to Number with an arbitrary radix.
  • Number.prototype.toString() prints a Number to a string with an arbitrary radix.
  • BigInt.prototype.toString() prints a BigInt to a string with an arbitrary radix.

However, I cannot find a built-in function to parse a string to a BigInt with an arbitrary radix. Stack Overflow seems to agree.

Worth including in this proposal?

(Follow-up to #5)

Yes, I think that would probably be out of scope of this particular proposal, and best left to @mathiasbynens’s proposal (I want that proposal a lot!), but thank you for raising it.