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 1.2.2 to 1.2.3

17

lib/bn.js

@@ -1665,12 +1665,10 @@ // Utils

var uhi = 0;
var hi = 0;
// bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
var hi;
var lo = 0;
for (var i = 0; i < num.length; i++) {
var w = num.words[i];
hi += w * 0x40;
hi = w * 0x40;
lo += w * 0x3d1;
hi += (lo / 0x4000000) | 0;
uhi += (hi / 0x4000000) | 0;
hi &= 0x3ffffff;
lo &= 0x3ffffff;

@@ -1681,11 +1679,10 @@

lo = hi;
hi = uhi;
uhi = 0;
}
// Fast length reduction
if (num.words[num.length - 1] === 0)
if (num.words[num.length - 1] === 0) {
num.length--;
if (num.words[num.length - 1] === 0)
num.length--;
if (num.words[num.length - 1] === 0)
num.length--;
}
return num;

@@ -1692,0 +1689,0 @@ };

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

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

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