cidr-block-check

1.0.6 • Public • Published

cidr-block-check MIT License build

NPM module that checks if a given IP address is part of a given CIDR block.

Details about CIDR can be found here.

Installation

npm i cidr-block-check

Usage

import cidrBlockCheck from 'cidr-block-check';

const cidr = '192.168.1.17/22';
const ip = '192.168.2.10';

console.log(cidrBlockCheck.v4.isInBlock(cidr,ip));
// true

Readme

Keywords

Package Sidebar

Install

npm i cidr-block-check

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

8.11 kB

Total Files

5

Last publish

Collaborators

  • piraluc