Comparing version 3.1.0 to 3.1.1
"use strict"; | ||
const cidrRegex = require("cidr-regex"); | ||
const re4 = cidrRegex.v4({exact: true}); | ||
@@ -4,0 +5,0 @@ const re6 = cidrRegex.v6({exact: true}); |
{ | ||
"name": "is-cidr", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Check if a string is an IP address in CIDR notation", | ||
@@ -36,7 +36,12 @@ "author": "silverwind <me@silverwind.io>", | ||
"devDependencies": { | ||
"eslint": "^6.2.1", | ||
"eslint-config-silverwind": "^4.0.4", | ||
"updates": "^8.5.3", | ||
"ver": "^5.1.3" | ||
"eslint": "7.0.0", | ||
"eslint-config-silverwind": "13.1.0", | ||
"jest": "26.0.1", | ||
"updates": "10.2.11", | ||
"versions": "8.2.9" | ||
}, | ||
"jest": { | ||
"verbose": false, | ||
"testTimeout": 10000 | ||
} | ||
} |
# is-cidr | ||
[![](https://img.shields.io/npm/v/is-cidr.svg?style=flat)](https://www.npmjs.org/package/is-cidr) [![](https://img.shields.io/npm/dm/is-cidr.svg)](https://www.npmjs.org/package/is-cidr) [![](https://api.travis-ci.org/silverwind/is-cidr.svg?style=flat)](https://travis-ci.org/silverwind/is-cidr) | ||
[![](https://img.shields.io/npm/v/is-cidr.svg?style=flat)](https://www.npmjs.org/package/is-cidr) [![](https://img.shields.io/npm/dm/is-cidr.svg)](https://www.npmjs.org/package/is-cidr) | ||
@@ -13,17 +13,14 @@ > Check if a string is an IP address in CIDR notation | ||
## Usage | ||
```js | ||
const isCidr = require('is-cidr'); | ||
const isCidr = require("is-cidr"); | ||
isCidr('192.168.0.1/24'); //=> 4 | ||
isCidr('1:2:3:4:5:6:7:8/64'); //=> 6 | ||
isCidr('10.0.0.0'); //=> 0 | ||
isCidr.v6('10.0.0.0/24'); //=> false | ||
isCidr("192.168.0.1/24"); //=> 4 | ||
isCidr("1:2:3:4:5:6:7:8/64"); //=> 6 | ||
isCidr("10.0.0.0"); //=> 0 | ||
isCidr.v6("10.0.0.0/24"); //=> false | ||
``` | ||
## API | ||
### isCidr(input) | ||
@@ -41,3 +38,2 @@ | ||
## Related | ||
@@ -44,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4464
5
48