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 0.13.2 to 0.13.3

2

1.js

@@ -38,3 +38,3 @@ var BN = require('./');

function toTyped(n) {
var w = new Uint32Array(Math.min(160, n.length));
var w = new Uint32Array(Math.max(160, n.length));
for (var i = 0; i < w.length; i++)

@@ -41,0 +41,0 @@ w[i] = n.words[i] | 0;

@@ -55,4 +55,12 @@ // Utils

}
this.words = [ number & 0x3ffffff ];
this.length = 1;
if (number < 0x4000000) {
this.words = [ number & 0x3ffffff ];
this.length = 1;
} else {
this.words = [
number & 0x3ffffff,
(number / 0x4000000) & 0x3ffffff
];
this.length = 2;
}
return;

@@ -59,0 +67,0 @@ } else if (typeof number === 'object') {

{
"name": "bn.js",
"version": "0.13.2",
"version": "0.13.3",
"description": "Big number implementation in pure javascript",

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

@@ -7,2 +7,3 @@ var assert = require('assert');

assert.equal(new BN(12345).toString(16), '3039');
assert.equal(new BN(0x4123456).toString(16), '4123456');
});

@@ -9,0 +10,0 @@

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