From 2ef42ec735afa0b10796d8c0650802988565e9af Mon Sep 17 00:00:00 2001 From: William Chong Date: Tue, 27 Jun 2023 13:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BD=EF=B8=8F=20Patch=20big-integer=20t?= =?UTF-8?q?o=20support=20hex=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches/big-integer+1.6.51.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/big-integer+1.6.51.patch diff --git a/patches/big-integer+1.6.51.patch b/patches/big-integer+1.6.51.patch new file mode 100644 index 00000000..430c39af --- /dev/null +++ b/patches/big-integer+1.6.51.patch @@ -0,0 +1,15 @@ +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);