validate-ip-node

1.0.8 • Public • Published

⚠️ This package is deprecated.

validate-ip-node Logo

Validate IPv4 and IPv6 addresses.

NPM Package Version NPM Package Downloads NPM Package License

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.

Package Sidebar

Install

npm i validate-ip-node

Weekly Downloads

1,205

Version

1.0.8

License

MIT

Unpacked Size

8.35 kB

Total Files

6

Last publish

Collaborators

  • npm