Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bn.js

Package Overview
Dependencies
Maintainers
3
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bn.js - npm Package Compare versions

Comparing version 4.10.5 to 4.11.0

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc