You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

cidr-range

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

cidr-range

Get an array of IP addresses for a given CIDR range


Version published
Weekly downloads
7.3K
decreased by-18.02%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

cidr-range

Get an array of IP addresses for a given CIDR range

Note: If you need IPv6 support, check out cidr-tools's expand method.

Installation

$ npm install --save cidr-range

Example

var cidrRange = require('cidr-range');

cidrRange('1.2.3.4/30');
//=> [ '1.2.3.4', '1.2.3.5', '1.2.3.6', '1.2.3.7' ]

API

cidrRange(cidr, [options])

  • cidr {String} The IP address in CIDR notation. Required.
  • options {Object} Options object.
Options
  • onlyHosts {Boolean} Whether the network and broadcast addresses should be excluded. Only works for /30 and below. Default: false.

© 2015 silverwind, distributed under BSD licence

Keywords

FAQs

Package last updated on 31 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc