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

is-cidr

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-cidr - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

17

index.js
"use strict";
const cidrRegex = require("cidr-regex");
const {v4, v6} = require("cidr-regex");
const re4 = cidrRegex.v4({exact: true});
const re6 = cidrRegex.v6({exact: true});
const re4 = v4({exact: true});
const re6 = v6({exact: true});
const isCidr = module.exports = str => {
if (re4.test(str)) return 4;
if (re6.test(str)) return 6;
return 0;
};
isCidr.v4 = str => re4.test(str);
isCidr.v6 = str => re6.test(str);
module.exports = str => re4.test(str) ? 4 : (re6.test(str) ? 6 : 0);
module.exports.v4 = str => re4.test(str);
module.exports.v6 = str => re6.test(str);
{
"name": "is-cidr",
"version": "4.0.1",
"version": "4.0.2",
"description": "Check if a string is an IP address in CIDR notation",

@@ -33,9 +33,9 @@ "author": "silverwind <me@silverwind.io>",

"dependencies": {
"cidr-regex": "^3.1.0"
"cidr-regex": "^3.1.1"
},
"devDependencies": {
"eslint": "7.8.1",
"eslint-config-silverwind": "18.0.8",
"eslint": "7.10.0",
"eslint-config-silverwind": "18.0.10",
"jest": "26.4.2",
"updates": "10.3.6",
"updates": "11.1.5",
"versions": "8.4.3"

@@ -42,0 +42,0 @@ },

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