validate-ip-node
v1.0.8
Published
Validate IPv4 and IPv6 addresses.
Downloads
5,327
Maintainers
Readme
⚠️ This package is deprecated.
Validate IPv4 and IPv6 addresses.
Installation
npm install validate-ip-node
Usage Example
var validateIP = require('validate-ip-node');
console.log(validateIP('46.19.37.108'));
console.log(validateIP('46.19.37'));
console.log(validateIP('2a02:2770::21a:4aff:feb3:2ee'));
console.log(validateIP('2a02:2770'));
true
false
true
false
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
License
Distributed under the MIT License.