nice-ip
v1.0.4
Published
IP library for JS
Downloads
2
Readme
nice-ip
IP library for JS. Convert IPv4 and IPv6 into prefixed binary strings and deserialize them later.
var ip = require('nice-ip');
var x = ip.bin('127.0.0.1', 8); // -> '401111111'
ip.nice(x); // -> '127.0.0.0'
var y = ip.bin('::1'); // -> '60' ... '01'
ip.nice(y); // -> '::1'