Comparing version 4.10.5 to 4.11.0
{ | ||
"name": "bn.js", | ||
"version": "4.10.5", | ||
"version": "4.11.0", | ||
"description": "Big number implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/bn.js", |
@@ -84,2 +84,3 @@ # <img src="./logo.png" alt="bn.js" width="160" height="160" /> | ||
* `a.fromTwos(width)` - convert from two's complement representation, where `width` is the bit width | ||
* `a.isBN(object)` - returns true if the supplied `object` is a BN.js instance | ||
@@ -86,0 +87,0 @@ ### Arithmetics |
@@ -333,2 +333,14 @@ /* global describe, it */ | ||
}); | ||
describe('.isBN', function () { | ||
it('should return true for BN', function () { | ||
assert.equal(BN.isBN(new BN()), true); | ||
}); | ||
it('should return false for everything else', function () { | ||
assert.equal(BN.isBN(1), false); | ||
assert.equal(BN.isBN([]), false); | ||
assert.equal(BN.isBN({}), false); | ||
}); | ||
}); | ||
}); |
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
168166
4700
220