isIPv4

external fun isIPv4(input: String): Boolean(source)

Returns true if input is an IPv4 address in dot-decimal notation with no leading zeroes. Otherwise, returns false.

net.isIPv4('127.0.0.1'); // returns true
net.isIPv4('127.000.000.001'); // returns false
net.isIPv4('127.0.0.1/24'); // returns false
net.isIPv4('fhqwhgads'); // returns false

Since

v0.3.0