Check if String
is an IPv4 address.
npm install is-ipv4-node
var isIPv4 = require('is-ipv4-node');
console.log(isIPv4('46.19.37.108'));
console.log(isIPv4('Hello World!'));
true
false
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
Distributed under the MIT License.