New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ipv4.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipv4.js

IPv4 utils for nodejs/iojs.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

IPv4.js

IPv4 utils for nodejs/iojs.

npm install ipv4.js

Build Status

Examples

var ipv4 = require('ipv4.js');
ipv4.aton('192.168.0.1')  // -1062731775
ipv4.ntoa(0xffffffff)  // '255.255.255.255'
ipv4.not('255.255.0.0') // '0.0.255.255'
ipv4.or('1.1.0.0', '0.0.1.1')  // '1.1.1.1'
ipv4.xor('0.255.255.255', '192.255.255.255') // '192.0.0.0'
ipv4.next('192.168.0.1')  // '192.168.0.2'
ipv4.prev('192.168.0.1')  // '192.168.0.0'
ipv4.network('192.168.0.0/24')
// => 
// { address: '192.168.0.0',
//   bitmask: 24,
//   mask: '255.255.255.0',
//   hostmask: '0.0.0.255',
//   broadcast: '192.168.0.255',
//   first: '192.168.0.1',
//   last: '192.168.0.254',
//   size: 254 }

License

MIT. (c) Chao Wang hit9@icloud.com

Keywords

ipv4

FAQs

Package last updated on 20 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts