1.0.6 • Published 3 years ago

cidr-block-check v1.0.6

Weekly downloads
29
License
MIT
Repository
github
Last release
3 years ago

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
1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago