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
120
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 2.0.0 to 2.0.1

6

lib/bn.js

@@ -98,2 +98,8 @@ (function (module, exports) {

assert(typeof number.length === 'number');
if (number.length <= 0) {
this.words = [ 0 ];
this.length = 1;
return this;
}
this.length = Math.ceil(number.length / 3);

@@ -100,0 +106,0 @@ this.words = new Array(this.length);

2

package.json
{
"name": "bn.js",
"version": "2.0.0",
"version": "2.0.1",
"description": "Big number implementation in pure javascript",

@@ -5,0 +5,0 @@ "main": "lib/bn.js",

@@ -1,4 +0,7 @@

# bn.js [![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js)
# <img src="./logo.png" alt="bn.js" width="160" height="160" />
> BigNum in pure javascript
[![Build Status](https://secure.travis-ci.org/indutny/bn.js.png)](http://travis-ci.org/indutny/bn.js)
## Install

@@ -5,0 +8,0 @@ `npm install --save bn.js`

@@ -68,2 +68,6 @@ var assert = require('assert');

describe('with Array input', function() {
it('should not fail on empty array', function() {
assert.equal(new BN([ ]).toString(16), '0');
});
it('should import/export big endian', function() {

@@ -70,0 +74,0 @@ assert.equal(new BN([ 1, 2, 3 ]).toString(16), '10203');

Sorry, the diff of this file is not supported yet

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