nice-ip
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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'

Readme

Keywords

Package Sidebar

Install

npm i nice-ip

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

4.9 kB

Total Files

6

Last publish

Collaborators

  • makepost