inet_ipv4
====
Install with:
$ npm install inet_ipv4
Usage:
var inet_ipv4 = ; inet_ipv4// 3232235521 inet_ipv4// '192.168.0.1' inet_ipv4inet_ipv4inet_ipv4// '255.255.0.1' inet_ipv4// true
API Documentation
aton(str) -> int
http://linux.die.net/man/3/inet_aton Returns null if the parameter is invalid.
ntoa(int) -> str
http://linux.die.net/man/3/inet_ntoa Returns null if the parameter is invalid.
normalize(str) -> str
Converts the ip given as a parameter to a 4 part string format. Returns null if the parameter is invalid.
isValid(str) -> bool
Uses a regex to check if the parameter is a 4 part ip representation.
Tests
$ npm test