npm install ip2intConvert ip to int32 and vice versa.
Install with npm:
You can installed into the global.
``shell`
$ npm install -g ip2int
Also installed into the project.
`shell`
$ npm install ip2int --save`Contributing / Testing
shell`
$ npm run test`Command Line
If you do not enter any value, the default return to the machine IP addressshell`
$ ip2int [ip_address | int32]`
E.g.shell
$ ip2int 127.0.0.1
16777343
$ ip2int 16777343
127.0.0.1
$ ip2int
172.22.156.37
`API
`js
var ip2int = require('ip2int');
ip2int.lookup('127.0.0.1'); // => 16777343
ip2int.lookup(16777343); // => '127.0.0.1'
ip2int.lookup(); // => 172.22.156.37
`
`js`
ip2int.ip2int('192.168.10.17'); // => 285911232
`js`
ip2int.int2ip(285911232); // => '192.168.10.17'
`js``
ip2int.getLocalIP(); // => '172.22.156.37'