Sadly, transpiling BigInt code is not feasible, since it involves operator overloading. https://github.com/GoogleChromeLabs/jsbi#why … So JSBI tackles this problem from the opposite angle.
-
-
Show this thread
-
Instead of writing code using native BigInt and transpiling down (BigInt → polyfill), developers can now write their code using JSBI for compatibility, and transpile up (polyfill → BigInt) once BigInts are universally supported.
Show this thread -
First one to create a Babel plugin that transpiles JSBI-based code into native BigInt code wins the internet.https://github.com/GoogleChromeLabs/jsbi/issues/2 …
Show this thread -
Kudos to
@JakobKummerow from the@v8js team for creating JSBI! First he adds native BigInt support to@v8js, and now he’s created the JavaScript polyfill too… Thank you Jakob!
Show this thread
End of conversation
New conversation -
-
-
Super naive question: does the spec require creating a BigInt object every time or is there a way of simply extending the Number prototype?
-
We’d have to convert them to the BigInt representation whenever crossing the safe integer range, which would add complexity and performance overhead.
- 3 more replies
New conversation -
-
-
Well ... "all browsers" except IE 11 and earlier.
-
Have you tried? I don’t see why a transpiled version of JSBI wouldn’t support IE11.
End of conversation
New conversation -
-
-
This is the 17th bigint library in JS in my list...
-
What other BigInt library matches the spec?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
New: JSBI, a pure-JavaScript BigInt implementation