I’m not familiar with modern JS and tooling to even try something.
References:
https://github.com/tc39/proposal-bigint
2
globalThis.BigInt === BigInt
core-js's polyfill requires Chrome 71 or Firefox 65.
core-js
https://github.com/tc39/proposal-global
http://zloirock.github.io/core-js/compat/
if('BigInt' in window) (or if(window.BigInt)) should suffice.
if('BigInt' in window)
if(window.BigInt)
Click here to cancel reply.
2
Answers
globalThis.BigInt === BigInt
core-js
's polyfill requires Chrome 71 or Firefox 65.References:
https://github.com/tc39/proposal-global
http://zloirock.github.io/core-js/compat/
if('BigInt' in window)
(orif(window.BigInt)
) should suffice.