question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow alternative implementations of BigInt compatibility libraries

See original GitHub issue

Currently, the polyfill makes heavy use of the big-integer library to polyfill native BigInt. It would be preferable if this support library could be wrapped behind an interface and alternative implementations could be used instead.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
12wrigjacommented, Aug 10, 2021

I’ve spoken with the JSBI maintainers and they are onboard to review a migration of the JSBI source to TypeScript, which I’m undertaking now.

JSBI is designed to be transpiled to native BigInt calls via a Babel plugin which sounds good for code-size assuming that this isn’t already happening for big-integer.

0reactions
12wrigjacommented, Nov 23, 2021

verify that babel can detect all the uses

I remain skeptical this can be done correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cosmjs incompatibility with ES2018 · Issue #1144 - GitHub
The issue with bigint and ES2018 is that TypeScript does not transpile the usage of native bigint to an alternative implementation as it ......
Read more >
The Essential Guide To JavaScript's Newest Data Type: BigInt
The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type....
Read more >
BigInt - JavaScript - MDN Web Docs
BigInt values represent numeric values which are too large to be represented by the number primitive.
Read more >
SE-0368: StaticBigInt - Proposal Reviews - Swift Forums
No, a simple implementation could store both a StaticBigInt and an array of words (which may be empty if unused). public struct BigInt: ......
Read more >
How to implement Big Int in Javascript? - Stack Overflow
For learning about how native BigInt is implemented, this V8 blog post gives some insight. Side note: JavaScript is perfectly capable of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found