validate6() function

Asserts that a string is a valid IPv6 address.

Signature:

export declare function validate6(ip: string): void;

Parameters

Parameter

Type

Description

ip

string

the string to check

Returns:

void

Nothing. It either passes or throws.

Exceptions

TypeError 'Given network address "<ip>" is invalid!' — including for a valid IPv4 address.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.