JSPM

@jobscale/cidr

0.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q28244F
  • License MIT

CIDR IP Address

Package Exports

  • @jobscale/cidr
  • @jobscale/cidr/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jobscale/cidr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@jobscale/cidr

Installation

npm i @jobscale/cidr

Examples

has

const { Cidr } = require('@jobscale/cidr');

new Cidr('0.0.0.0/0').has('160.160.160.160')

new Cidr('160.160.160.160/32').has('160.160.160.160')

new Cidr('160.160.160.160').has('160.160.160.160');

new Cidr([
  '172.16.0.0/12',
  '160.160.160.160/30',
]).has('160.160.160.160');

Jest test

git clone https://github.com/jobscale/cidr.git jobscale-cidr
cd $_
npm test