Skip to content
Validate IPv4 and IPv6 addresses.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.editorconfig
.gitattributes
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

validate-ip-node Logo

Validate IPv4 and IPv6 addresses.

NPM Package Version NPM Package License NPM Package Downloads devDependencies Status

Node Version Travis CI Build Status Code Climate Status Code Climate Test Coverage Status Inch CI Documentation Coverage Status

NPM Package Statistics

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.

You can’t perform that action at this time.