Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse string to BigInt with radix? #12

Closed
sffc opened this issue Sep 5, 2021 · 2 comments
Closed

Parse string to BigInt with radix? #12

sffc opened this issue Sep 5, 2021 · 2 comments

Comments

@sffc
Copy link

sffc commented Sep 5, 2021

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)

@jakobkummerow
Copy link

See also: https://github.com/tc39/proposal-number-fromstring

@js-choi
Copy link
Collaborator

js-choi commented Sep 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants