Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch big-integer@1.6.51 for the project I'm working on.
while trying this package with React Native for android , i was getting invalid integer when passing the value with leading 0x , applied this solutions to make this work.
Here is the diff that solved my problem:
diff --git a/node_modules/big-integer/BigInteger.js b/node_modules/big-integer/BigInteger.js
index c4263d5..cae03c7 100644
--- a/node_modules/big-integer/BigInteger.js
+++ b/node_modules/big-integer/BigInteger.js
@@ -10,6 +10,10 @@ var bigInt = (function (undefined) {
var supportsNativeBigInt = typeof BigInt === "function";
function Integer(v, radix, alphabet, caseSensitive) {
+ if (v.toString().includes('0x')) {
+ v = v.substring(2);
+ radix = 16;
+ }
if (typeof v === "undefined") return Integer[0];
if (typeof radix !== "undefined") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive);
return parseValue(v);
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
big-integer@1.6.51
for the project I'm working on.while trying this package with React Native for android , i was getting invalid integer when passing the value with leading 0x , applied this solutions to make this work.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.