Moonlight-io / asteroid-sdk-js

5 stars 3 forks source link

`BigInt` method is not available in Safari and IE browsers #73

Closed rockacola closed 4 years ago

rockacola commented 4 years ago

As seen in https://github.com/Moonlight-io/vega/issues/567

Safari and IE do not have BigInt method.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

Polyfill or alternative approach is needed

rockacola commented 4 years ago

This seems to be a polyfill without changing of usages: https://github.com/graup/bigint-polyfill

If we are to consider a library with comprehensive features and is maintained, then we can consider: https://www.npmjs.com/package/bignumber.js

rockacola commented 4 years ago

bignumber.js 7.2.1 is been used by @cityofzion/neon-core, so it is possible to adapt its usage without increasing the package's file size.