CORRECTION: see first comment
Java's BigInteger has a longValue() getter to return the BigInteger's value as a long.
dart-bignum's only has an intValue(). While Dart does not have a long type, the integer type does support numbers larger than 32 bits. However, the intValue() getter caps the value at 32 bits.
So there should be a longValue() getter that allows for numbers up to 64 bits. Dart supports 64-bit integers and JS also supports ints larger than 32 bits.
I tried to look at it myself, but I don't fully understand the code. (Does the JS BigInteger have a longValue()?)
CORRECTION: see first comment
Java's BigInteger has a
longValue()getter to return the BigInteger's value as a long.dart-bignum's only has an
intValue(). While Dart does not have a long type, the integer type does support numbers larger than 32 bits. However, theintValue()getter caps the value at 32 bits.So there should be a
longValue()getter that allows for numbers up to 64 bits. Dart supports 64-bit integers and JS also supports ints larger than 32 bits.I tried to look at it myself, but I don't fully understand the code. (Does the JS BigInteger have a
longValue()?)