@ethersproject/bignumber
Advanced tools
Comparing version 5.5.0 to 5.6.0
@@ -1,2 +0,2 @@ | ||
export declare const version = "bignumber/5.5.0"; | ||
export declare const version = "bignumber/5.6.0"; | ||
//# sourceMappingURL=_version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = "bignumber/5.5.0"; | ||
export const version = "bignumber/5.6.0"; | ||
//# sourceMappingURL=_version.js.map |
@@ -60,3 +60,3 @@ "use strict"; | ||
if (o.isZero()) { | ||
throwFault("division by zero", "div"); | ||
throwFault("division-by-zero", "div"); | ||
} | ||
@@ -71,3 +71,3 @@ return toBigNumber(toBN(this).div(toBN(other))); | ||
if (value.isNeg()) { | ||
throwFault("cannot modulo negative values", "mod"); | ||
throwFault("division-by-zero", "mod"); | ||
} | ||
@@ -79,3 +79,3 @@ return toBigNumber(toBN(this).umod(value)); | ||
if (value.isNeg()) { | ||
throwFault("cannot raise to negative values", "pow"); | ||
throwFault("negative-power", "pow"); | ||
} | ||
@@ -87,3 +87,3 @@ return toBigNumber(toBN(this).pow(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'and' negative values", "and"); | ||
throwFault("unbound-bitwise-result", "and"); | ||
} | ||
@@ -95,3 +95,3 @@ return toBigNumber(toBN(this).and(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'or' negative values", "or"); | ||
throwFault("unbound-bitwise-result", "or"); | ||
} | ||
@@ -103,3 +103,3 @@ return toBigNumber(toBN(this).or(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'xor' negative values", "xor"); | ||
throwFault("unbound-bitwise-result", "xor"); | ||
} | ||
@@ -110,3 +110,3 @@ return toBigNumber(toBN(this).xor(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot mask negative values", "mask"); | ||
throwFault("negative-width", "mask"); | ||
} | ||
@@ -117,3 +117,3 @@ return toBigNumber(toBN(this).maskn(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shl"); | ||
throwFault("negative-width", "shl"); | ||
} | ||
@@ -124,3 +124,3 @@ return toBigNumber(toBN(this).shln(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shr"); | ||
throwFault("negative-width", "shr"); | ||
} | ||
@@ -127,0 +127,0 @@ return toBigNumber(toBN(this).shrn(value)); |
@@ -1,2 +0,2 @@ | ||
export declare const version = "bignumber/5.5.0"; | ||
export declare const version = "bignumber/5.6.0"; | ||
//# sourceMappingURL=_version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = "bignumber/5.5.0"; | ||
exports.version = "bignumber/5.6.0"; | ||
//# sourceMappingURL=_version.js.map |
@@ -67,3 +67,3 @@ "use strict"; | ||
if (o.isZero()) { | ||
throwFault("division by zero", "div"); | ||
throwFault("division-by-zero", "div"); | ||
} | ||
@@ -78,3 +78,3 @@ return toBigNumber(toBN(this).div(toBN(other))); | ||
if (value.isNeg()) { | ||
throwFault("cannot modulo negative values", "mod"); | ||
throwFault("division-by-zero", "mod"); | ||
} | ||
@@ -86,3 +86,3 @@ return toBigNumber(toBN(this).umod(value)); | ||
if (value.isNeg()) { | ||
throwFault("cannot raise to negative values", "pow"); | ||
throwFault("negative-power", "pow"); | ||
} | ||
@@ -94,3 +94,3 @@ return toBigNumber(toBN(this).pow(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'and' negative values", "and"); | ||
throwFault("unbound-bitwise-result", "and"); | ||
} | ||
@@ -102,3 +102,3 @@ return toBigNumber(toBN(this).and(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'or' negative values", "or"); | ||
throwFault("unbound-bitwise-result", "or"); | ||
} | ||
@@ -110,3 +110,3 @@ return toBigNumber(toBN(this).or(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'xor' negative values", "xor"); | ||
throwFault("unbound-bitwise-result", "xor"); | ||
} | ||
@@ -117,3 +117,3 @@ return toBigNumber(toBN(this).xor(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot mask negative values", "mask"); | ||
throwFault("negative-width", "mask"); | ||
} | ||
@@ -124,3 +124,3 @@ return toBigNumber(toBN(this).maskn(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shl"); | ||
throwFault("negative-width", "shl"); | ||
} | ||
@@ -131,3 +131,3 @@ return toBigNumber(toBN(this).shln(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shr"); | ||
throwFault("negative-width", "shr"); | ||
} | ||
@@ -134,0 +134,0 @@ return toBigNumber(toBN(this).shrn(value)); |
{ | ||
"author": "Richard Moore <me@ricmoo.com>", | ||
"dependencies": { | ||
"@ethersproject/bytes": "^5.5.0", | ||
"@ethersproject/logger": "^5.5.0", | ||
"@ethersproject/bytes": "^5.6.0", | ||
"@ethersproject/logger": "^5.6.0", | ||
"bn.js": "^4.11.9" | ||
@@ -20,3 +20,3 @@ }, | ||
], | ||
"gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0", | ||
"gitHead": "b8cda5dffdcb688e38d7c6a0aec4c7b8b59c1af5", | ||
"keywords": [ | ||
@@ -43,5 +43,5 @@ "Ethereum", | ||
"sideEffects": false, | ||
"tarballHash": "0xc96a25dc52eed1cbc00347b751e5beea569cdc12b2c2df276fc08a7f4d756f72", | ||
"tarballHash": "0xffcf139ec01d3c95ed1f8b9274398ce62c61e6db410ae30d23609c7227d94992", | ||
"types": "./lib/index.d.ts", | ||
"version": "5.5.0" | ||
"version": "5.6.0" | ||
} |
@@ -1,1 +0,1 @@ | ||
export const version = "bignumber/5.5.0"; | ||
export const version = "bignumber/5.6.0"; |
@@ -86,3 +86,3 @@ "use strict"; | ||
if (o.isZero()) { | ||
throwFault("division by zero", "div"); | ||
throwFault("division-by-zero", "div"); | ||
} | ||
@@ -99,3 +99,3 @@ return toBigNumber(toBN(this).div(toBN(other))); | ||
if (value.isNeg()) { | ||
throwFault("cannot modulo negative values", "mod"); | ||
throwFault("division-by-zero", "mod"); | ||
} | ||
@@ -108,3 +108,3 @@ return toBigNumber(toBN(this).umod(value)); | ||
if (value.isNeg()) { | ||
throwFault("cannot raise to negative values", "pow"); | ||
throwFault("negative-power", "pow"); | ||
} | ||
@@ -117,3 +117,3 @@ return toBigNumber(toBN(this).pow(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'and' negative values", "and"); | ||
throwFault("unbound-bitwise-result", "and"); | ||
} | ||
@@ -126,3 +126,3 @@ return toBigNumber(toBN(this).and(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'or' negative values", "or"); | ||
throwFault("unbound-bitwise-result", "or"); | ||
} | ||
@@ -135,3 +135,3 @@ return toBigNumber(toBN(this).or(value)); | ||
if (this.isNegative() || value.isNeg()) { | ||
throwFault("cannot 'xor' negative values", "xor"); | ||
throwFault("unbound-bitwise-result", "xor"); | ||
} | ||
@@ -143,3 +143,3 @@ return toBigNumber(toBN(this).xor(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot mask negative values", "mask"); | ||
throwFault("negative-width", "mask"); | ||
} | ||
@@ -151,3 +151,3 @@ return toBigNumber(toBN(this).maskn(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shl"); | ||
throwFault("negative-width", "shl"); | ||
} | ||
@@ -159,3 +159,3 @@ return toBigNumber(toBN(this).shln(value)); | ||
if (this.isNegative() || value < 0) { | ||
throwFault("cannot shift negative values", "shr"); | ||
throwFault("negative-width", "shr"); | ||
} | ||
@@ -162,0 +162,0 @@ return toBigNumber(toBN(this).shrn(value)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143627
Updated@ethersproject/bytes@^5.6.0
Updated@ethersproject/logger@^5.6.0