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