network-calculator
v2.0.1
Published
Network Calculator
Downloads
48
Maintainers
Readme
Network Calculator
Network Calculator helps you get information about an IP address
Install
$ npm install --save network-calculator
Usage
var nc = require('network-calculator');
console.log(nc('192.168.1.4', '255.255.255.128'));
// >
// {
// network: '192.168.1.0',
// bitmask: 25,
// firsthost: '192.168.1.1',
// broadcast: '192.168.1.127',
// lasthost: '192.168.1.126',
// totalhost: 126
// }
CLI
$ npm install -g network-calculator
$ nc --help
Usage
nc <ip> <netmask>
Example
nc 192.168.1.4 255.255.255.128
License
MIT © Mert Kahyaoğlu