Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ipv4-ipv6-format-check

suchendra17MIT1.0.4

A nodejs module to validate the ipv4 and ipv6 format

ip4, ip6, node, module

readme

ipv4-ipv6-format-check

A Node.js package that checks whether a given string is in ipv4/ipv6 format.

Usage

First, install the package using npm:

npm install ipv4-ipv6-format-check --save

Then, require the package and use it like so:

var checkFormat = require('ipv4-ipv6-format-check');

To validate the IPv4 format:

checkFormat.checkIPFour('10.256.133.1')

To validate the IPv6 format:

checkFormat.checkIPSix('0000:0000:0000:0000:1010:0001:0001:00001')

License

MIT