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.1.0 to 2.2.0

4

lib/bn.js

@@ -1012,2 +1012,6 @@ (function (module, exports) {

BN.prototype.muln = function muln(num) {
return this.clone().imuln(num);
};
// `this` * `this`

@@ -1014,0 +1018,0 @@ BN.prototype.sqr = function sqr() {

2

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

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

@@ -219,2 +219,12 @@ var assert = require('assert');

describe('.muln()', function() {
it('should multiply number by small number', function() {
var a = new BN('abcdef01234567890abcd', 16);
var b = new BN('dead', 16);
var c = a.mul(b);
assert.equal(a.muln(0xdead).toString(16), c.toString(16));
});
});
describe('.div()', function() {

@@ -221,0 +231,0 @@ it('should divide numbers', function() {

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