Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2020-09-30 20:26:31 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-09-30 20:26:31 +0300
commita27e8d00664e5d4c3e81d664253a10176adb39c8 (patch)
treea028261d73d4e99b649edea99b85306b08b3d07b /node_modules/is-cidr
parent2aa9a1f8a5773b9a960b14b51c8111fb964bc9ae (diff)
is-cidr@4.0.2
Diffstat (limited to 'node_modules/is-cidr')
-rw-r--r--node_modules/is-cidr/index.js17
-rw-r--r--node_modules/is-cidr/package.json16
2 files changed, 14 insertions, 19 deletions
diff --git a/node_modules/is-cidr/index.js b/node_modules/is-cidr/index.js
index 911c4bef6..8caef5fbb 100644
--- a/node_modules/is-cidr/index.js
+++ b/node_modules/is-cidr/index.js
@@ -1,14 +1,9 @@
"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);
diff --git a/node_modules/is-cidr/package.json b/node_modules/is-cidr/package.json
index 370983472..b02775a0e 100644
--- a/node_modules/is-cidr/package.json
+++ b/node_modules/is-cidr/package.json
@@ -1,6 +1,6 @@
{
"name": "is-cidr",
- "version": "3.1.1",
+ "version": "4.0.2",
"description": "Check if a string is an IP address in CIDR notation",
"author": "silverwind <me@silverwind.io>",
"contributors": [
@@ -12,7 +12,7 @@
"test": "make test"
},
"engines": {
- "node": ">=6"
+ "node": ">=10"
},
"files": [
"index.js",
@@ -30,14 +30,14 @@
"network"
],
"dependencies": {
- "cidr-regex": "^2.0.10"
+ "cidr-regex": "^3.1.1"
},
"devDependencies": {
- "eslint": "7.0.0",
- "eslint-config-silverwind": "13.1.0",
- "jest": "26.0.1",
- "updates": "10.2.11",
- "versions": "8.2.9"
+ "eslint": "7.10.0",
+ "eslint-config-silverwind": "18.0.10",
+ "jest": "26.4.2",
+ "updates": "11.1.5",
+ "versions": "8.4.3"
},
"jest": {
"verbose": false,