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

cidr-tools

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cidr-tools - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

9

index.js

@@ -5,2 +5,3 @@ "use strict";

const IPCIDR = require("ip-cidr");
const isIp = require("is-ip");
const isCidr = require("is-cidr");

@@ -27,5 +28,5 @@ const ipv6Normalize = require("ipv6-normalize");

} else {
const parsed = new IPCIDR(cidrTools.normalize(str));
if (parsed && parsed.address) {
return new IPCIDR(cidrTools.normalize(`${str}/${bits[parsed.address.v4 ? "v4" : "v6"]}`));
const version = isIp.version(str);
if (version) {
return new IPCIDR(cidrTools.normalize(`${str}/${bits[`v${version}`]}`));
} else {

@@ -223,3 +224,3 @@ throw new Error(`Network is not a CIDR or IP: ${str}`);

const parsed = new IPCIDR(cidr);
const parsed = parse(cidr);
if (parsed && parsed.address && parsed.address.v4) {

@@ -226,0 +227,0 @@ return cidr;

{
"name": "cidr-tools",
"version": "3.0.0",
"version": "3.0.1",
"author": "silverwind <me@silverwind.io>",

@@ -33,5 +33,6 @@ "description": "Tools to work with IPv4 and IPv6 CIDR network lists",

"ip-address": "^6.3.0",
"ip-cidr": "^2.0.12",
"ip-cidr": "^2.0.17",
"ipv6-normalize": "^1.0.1",
"is-cidr": "^3.1.0",
"is-cidr": "^4.0.0",
"is-ip": "3.1.0",
"jsbn": "^1.1.0",

@@ -41,8 +42,8 @@ "string-natural-compare": "^3.0.1"

"devDependencies": {
"eslint": "6.8.0",
"eslint-config-silverwind": "11.0.4",
"jest": "26.0.1",
"updates": "10.2.10",
"versions": "8.2.7"
"eslint": "7.7.0",
"eslint-config-silverwind": "18.0.2",
"jest": "26.4.0",
"updates": "10.3.4",
"versions": "8.4.3"
}
}
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