peterolson / BigInteger.js

An arbitrary length integer library for Javascript
The Unlicense
1.12k stars 187 forks source link

Works fine in Google chrome but not in IE,Microsoft Edge. #182

Closed husainsr closed 5 years ago

husainsr commented 5 years ago

I had wrote let a = long('140627929000000122')['value']; works fine in Google chrome but in IE/Microsoft Edge i got comma separated value like [146, 2792900, 4406]

Yaffle commented 5 years ago

value is an internal property, it contains the native BigInt in browsers, that support it, and array in other browsers

husainsr commented 5 years ago

It is compatible with IE/Microsoft Edge ?

husainsr commented 5 years ago

ie How would i get value from this.

husainsr commented 5 years ago

Can anyone please answer me for the same.

Yaffle commented 5 years ago

@husainsr , Google Chrome has BigInt support, so this library uses the native BigInt internally. Edge does not support BigInt, so this library uses the array internally. So you will not be able to get the BigInt value in current version of Edge. You can use the objects provided by this library instead and convert them from/to a string. See https://github.com/peterolson/BigInteger.js/blob/master/README.md.

husainsr commented 5 years ago

Sorry this is not a feasible solution.