This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MIT License | |
//Copyright (c) 2013, Max Irwin | |
//Parses a CIDR Range into beginning and ending IPv4 Addresses | |
//For example: '10.0.0.0/24' | |
//Returns ['10.0.0.0', '10.0.0.255'] | |
var parseCIDR = function(CIDR) { | |
//Beginning IP address | |
var beg = CIDR.substr(CIDR,CIDR.indexOf('/')); |