aggregate-cidr
v1.0.4
Published
Aggregate a list of CIDR blocks
Downloads
322
Readme
aggregate-cidr
Description
De-dupes and coalesces adjacent CIDR blocks into a semantically equivalent list.
Handy for cleaning up big lists of IP addresses.
Usage
var aggregate = require('aggregate-cidr');
var nets = [
'10.0.0.0/8',
'10.0.0.1'
];
var aggregated_nets = aggregate(nets);
The result of the above is [ '10.0.0.0/8' ]
.
See the tests
directory for more examples.
Licence
aggregate-cidr
Copyright (C) 2015 The LateRooms Group
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
aggregate-cidr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.