cidr-tools icon indicating copy to clipboard operation
cidr-tools copied to clipboard

Convert a range of IPs into CIDR

Open Sf298 opened this issue 1 year ago • 0 comments

Hello I needed a function that can convert a range of IPs (192.168.0.1-192.168.0.33) into a list of CIDR formats (192.168.0.1/32, 192.168.0.2/31, 192.168.0.4/30, 192.168.0.8/29, 192.168.0.16/28, 192.168.0.32/31). I couldn't find a JS library to do it anywhere (I may have been bad at looking) so I made one myself. If you like, I can try make a PR and add it into this library or I could post my code here and let you handle it?

Sf298 avatar Aug 10 '24 07:08 Sf298