Skip to content

nykula/nice-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

IPv4 and IPv6 to binary and back

Resources

License

Stars

Watchers

Forks

Packages

No packages published