ip: speed up ipv6 parsing.
This commit is contained in:
parent
6617bd7d49
commit
546fccfca8
@ -124,6 +124,8 @@ IP.version = function version(str) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
IP.isV4Format = function(str) {
|
IP.isV4Format = function(str) {
|
||||||
|
if (str.length < 7)
|
||||||
|
return false;
|
||||||
return ipv4Regex.test(str);
|
return ipv4Regex.test(str);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user