ip: speed up ipv6 parsing.

This commit is contained in:
Christopher Jeffrey 2016-12-19 04:08:35 -08:00
parent 6617bd7d49
commit 546fccfca8
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -124,6 +124,8 @@ IP.version = function version(str) {
*/
IP.isV4Format = function(str) {
if (str.length < 7)
return false;
return ipv4Regex.test(str);
};