You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Returns `true` if input is a version 4 IP address, otherwise returns `false`.
46
+
*
47
+
* @param {string} input
48
+
*/
49
+
functionisIPv4(input){
50
+
returnIPv4Reg.test(input);
51
+
}
52
+
53
+
/**
54
+
* Returns `true` if input is a version 6 IP address, otherwise returns `false`.
55
+
*
56
+
* @param {string} input
57
+
*/
58
+
functionisIPv6(input){
59
+
returnIPv6Reg.test(input);
60
+
}
61
+
62
+
/**
63
+
* Tests if input is an IP address. Returns `0` for invalid strings, returns `4` for IP version 4 addresses, and returns `6` for IP version 6 addresses.
0 commit comments