Last active
October 17, 2018 19:20
-
-
Save intolerance/13f657d3765d9e950178f1bf4418d1c9 to your computer and use it in GitHub Desktop.
Netmask for IP traversing
This file contains 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
import { Netmask } from 'netmask'; | |
const block = new Netmask('192.168.150.0/21'); // 21 === 255.255.248.0 subnet | |
console.log(block.mask); | |
block.forEach(comp => { | |
console.log(comp); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment