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 3.1.0 to 3.1.1

1

index.js
"use strict";
const cidrRegex = require("cidr-regex");
const re4 = cidrRegex.v4({exact: true});

@@ -4,0 +5,0 @@ const re6 = cidrRegex.v6({exact: true});

15

package.json
{
"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 @@

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