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 0.1.5 to 0.1.6

12

lib/bn.js

@@ -354,2 +354,5 @@ var assert = require('assert');

if (this.cmp(0) === 0 || num.cmp(0) === 0)
return new BN(0);
var result = new BN(null);

@@ -399,2 +402,5 @@ result.sign = ((num.sign ? 1 : 0) ^ (this.sign ? 1 : 0)) ? true : false;

BN.prototype.sqr = function sqr() {
if (this.cmp(0) === 0)
return new BN(0);
var res = new BN(null);

@@ -870,2 +876,8 @@ res.words = new Array(2 * this.length);

var mont = this.mont;
if (this.cmp(0) === 0 || num.cmp(0) === 0) {
var res = new BN(0);
res.mont = mont;
return res;
}
var t = this.mul(num);

@@ -872,0 +884,0 @@ var c = t.mul(mont.minv).imask(mont.shift).mul(mont.m);

2

package.json
{
"name": "bn.js",
"version": "0.1.5",
"version": "0.1.6",
"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