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

bn.js

Package Overview
Dependencies
Maintainers
1
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.4.0 to 4.5.0

2

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

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