Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ip-cidr

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-cidr - npm Package Compare versions

Comparing version 3.0.7 to 3.0.8

5

index.js

@@ -16,6 +16,7 @@ "use strict";

this.address = address;
this.addressStart = address.startAddress();
this.addressEnd = address.endAddress();
this.addressStart = address.startAddress();
this.addressEnd = address.endAddress();
this.addressStart.subnet = this.addressEnd.subnet = this.address.subnet;
this.addressStart.subnetMask = this.addressEnd.subnetMask = this.address.subnetMask;
this.size = new BigInteger(this.addressEnd.bigInteger().subtract(this.addressStart.bigInteger()).add(new BigInteger('1')).toString());
}

@@ -22,0 +23,0 @@

2

package.json
{
"name": "ip-cidr",
"version": "3.0.7",
"version": "3.0.8",
"description": "Module for working with CIDR (v4, v6)",

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

@@ -34,3 +34,4 @@ "use strict";

assert.equal(cidr.addressStart.addressMinusSuffix, '2001:0db8:0000:0000:0000:0000:0000:0000', 'check the start');
assert.equal(cidr.addressEnd.addressMinusSuffix, '2001:0db8:0000:0000:0000:0000:0000:00ff', 'check the end');
assert.equal(cidr.addressEnd.addressMinusSuffix, '2001:0db8:0000:0000:0000:0000:0000:00ff', 'check the end');
assert.equal(cidr.toArray().length, cidr.size.toString(), 'check the size');
});

@@ -41,3 +42,3 @@

assert.equal(cidr.addressStart.addressMinusSuffix, validCIDRStart, 'check the start');
assert.equal(cidr.addressEnd.addressMinusSuffix, validCIDREnd, 'check the end');
assert.equal(cidr.addressEnd.addressMinusSuffix, validCIDREnd, 'check the end');

@@ -53,3 +54,3 @@ });

it('check as string', function () {
const cidr = new IPCIDR(validCIDR);
const cidr = new IPCIDR(validCIDR);
assert.equal(IPCIDR.formatIP(cidr.address), validCIDRClear);

@@ -56,0 +57,0 @@ });

Sorry, the diff of this file is too big to display

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