Comparing version 4.4.0 to 4.5.0
{ | ||
"name": "bn.js", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"description": "Big number implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/bn.js", |
@@ -68,2 +68,3 @@ # <img src="./logo.png" alt="bn.js" width="160" height="160" /> | ||
* `a.isOdd()` - no comments | ||
* `a.isZero()` - no comments | ||
* `a.cmp(b)` - compare numbers and return `-1` (`<`), `0` (`==`), or `1` (`>`) | ||
@@ -70,0 +71,0 @@ depending on the comparison result (`ucmp`, `cmpn`) |
@@ -81,2 +81,10 @@ var assert = require('assert'); | ||
describe('.isZero()', function() { | ||
it('should return true for zero', function() { | ||
assert.equal(new BN(0).isZero(), true); | ||
assert.equal(new BN(1).isZero(), false); | ||
assert.equal(new BN(0xffffffff).isZero(), false); | ||
}); | ||
}); | ||
describe('.bitLength()', function() { | ||
@@ -83,0 +91,0 @@ it('should return proper bitLength', function() { |
Sorry, the diff of this file is too big to display
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
164759
4718
205