Newton's Poleless Magnet

    cidr-overlap

    0.0.4 • Public • Published

    cidr-overlap

    CircleCI npm

    Get an array of overlaps that exist for a given array of CIDRs for subnets

    Installation

    $ npm i --save cidr-overlap
    

    Example

    const cidrOverlap = require('cidr-overlap');
     
    cidrOverlap(['10.0.3.0/24', '10.0.1.0/16']);
    //=> [ { startAddress: '10.0.3.0',
    //=>     endAddress: '10.0.3.255',
    //=>     cidr1: '10.0.3.0/24',
    //=>     cidr2: '10.0.1.0/16',
    //=>     overlapCidr: '10.0.3.0/24' } ]

    API

    cidrOverlap([cidrs])

    • cidr {Array} Strings of CIDRs representing subnets in the format '1.2.3.4/24'. Required.

    Install

    npm i cidr-overlap

    DownloadsWeekly Downloads

    621

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    5.93 kB

    Total Files

    7

    Last publish

    Collaborators

    • joesanford