isValid6() function
Whether a string is a valid IPv6 address.
Signature:
export declare function isValid6(ip: string): boolean;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
ip |
string |
the string to test |
Returns:
boolean
true only for IPv6; a valid IPv4 address gives false.
Remarks
Node's net.isIPv6, so the IPv4-mapped form ::ffff:1.2.3.4 counts as IPv6.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.