validate4() function
Asserts that a string is a valid IPv4 address.
Signature:
export declare function validate4(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 IPv6 address.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.