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

get-ip-range

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-ip-range

Simple utility to convert either CIDR notation or two IP addresses to an array of the range of IP addresses

  • 1.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
increased by60.16%
Maintainers
1
Weekly downloads
 
Created
Source

get-ip-range

Simple utility to convert either CIDR notation or two IP addresses to an array of the range of IP addresses


Build StatusCoverage StatusISC License

Installation

npm install --save get-ip-range

Usage

For CIDR notation:

const getIPRange = require('get-ip-range');

getIPRange('192.168.1.134/29');
// Returns an object: 
{
  error: null,
  value: array of 6 IP addresses
}

For two IP addresses:

const getIPRange = require('get-ip-range');

getIPRange('192.168.1.129', '192.168.1.134');
// Returns an object: 
{
  error: null,
  value: array of 6 IP addresses
}

Error scenario

If the supplied IP address(es) are invalid, the response.error value will be an Error

Keywords

FAQs

Package last updated on 08 Feb 2019

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc