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 2.0.1 to 2.0.2

12

index.js

@@ -45,2 +45,6 @@ "use strict";

function uniq(arr) {
return [...new Set(arr)];
}
function overlap(a, b) {

@@ -225,3 +229,3 @@ const aStart = a.start({type: "bigInteger"});

cidrTools.merge = function(nets) {
nets = (Array.isArray(nets) ? nets : [nets]).map(parse);
nets = uniq((Array.isArray(nets) ? nets : [nets]).map(parse));
const maps = mapNets(nets);

@@ -270,4 +274,4 @@

cidrTools.exclude = function(basenets, exclnets) {
basenets = Array.isArray(basenets) ? basenets : [basenets];
exclnets = Array.isArray(exclnets) ? exclnets : [exclnets];
basenets = uniq(Array.isArray(basenets) ? basenets : [basenets]);
exclnets = uniq(Array.isArray(exclnets) ? exclnets : [exclnets]);

@@ -304,3 +308,3 @@ basenets = cidrTools.merge(basenets);

cidrTools.expand = function(nets) {
nets = Array.isArray(nets) ? nets : [nets];
nets = uniq(Array.isArray(nets) ? nets : [nets]);

@@ -307,0 +311,0 @@ let ips = [];

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

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

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