soprox-abi
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -57,3 +57,3 @@ "use strict"; | ||
if (bigInt.gt(F)) throw new Error('BigInt is too big'); | ||
if (bigInt.gt(FMAX)) bigInt = F.sub(bigInt).add(ONE); // Using global.BigInt instead of BigInt due to browser understanding | ||
if (bigInt.gt(FMAX)) bigInt = NEONE.sub(F.sub(bigInt)); // Using global.BigInt instead of BigInt due to browser understanding | ||
@@ -81,3 +81,4 @@ return global.BigInt(bigInt.toString()); | ||
if (bigInt.gt(FF)) throw new Error('BigInt is too big'); | ||
if (bigInt.gt(FFMAX)) bigInt = FF.sub(bigInt).add(ONE); // Using global.BigInt instead of BigInt due to browser understanding | ||
if (bigInt.gt(FFMAX)) bigInt = NEONE.sub(FF.sub(bigInt)); | ||
console.log(bigInt.toString()); // Using global.BigInt instead of BigInt due to browser understanding | ||
@@ -84,0 +85,0 @@ return global.BigInt(bigInt.toString()); |
{ | ||
"name": "soprox-abi", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "A convention that convert Rust types to NodeJS types", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -38,3 +38,3 @@ const BN = require('bn.js') | ||
if (bigInt.gt(F)) throw new Error('BigInt is too big') | ||
if (bigInt.gt(FMAX)) bigInt = F.sub(bigInt).add(ONE) | ||
if (bigInt.gt(FMAX)) bigInt = NEONE.sub(F.sub(bigInt)) | ||
// Using global.BigInt instead of BigInt due to browser understanding | ||
@@ -61,3 +61,4 @@ return global.BigInt(bigInt.toString()) | ||
if (bigInt.gt(FF)) throw new Error('BigInt is too big') | ||
if (bigInt.gt(FFMAX)) bigInt = FF.sub(bigInt).add(ONE) | ||
if (bigInt.gt(FFMAX)) bigInt = NEONE.sub(FF.sub(bigInt)) | ||
console.log(bigInt.toString()) | ||
// Using global.BigInt instead of BigInt due to browser understanding | ||
@@ -64,0 +65,0 @@ return global.BigInt(bigInt.toString()) |
51807
1237