Create an IPv4 address from four decimal octets in the range 0-255.
abcdStatic ReadonlyAnyCompatibility alias for AnyV4.
Static ReadonlyAnyIPv4 wildcard interface address 0.0.0.0.
Static ReadonlyAnyIPv6 wildcard interface address ::.
Static ReadonlyBroadcastCompatibility alias for BroadcastV4.
Static ReadonlyBroadcastIPv4 broadcast address 255.255.255.255.
Static ReadonlyLocalCompatibility alias for LocalHostV4.
Static ReadonlyLocalIPv4 loopback address 127.0.0.1.
Static ReadonlyLocalIPv6 loopback address ::1.
Static ReadonlyTypeAddress family enumeration.
Compare by address family then address bytes; return a negative number, zero, or a positive number.
otherReturn whether this is an IPv4 address.
Return whether this is an IPv6 address.
Return a 16-byte copy of IPv6 data; throw TypeError for IPv4 addresses.
Return the IPv4 network-order unsigned 32-bit integer; throw TypeError for IPv6 addresses.
Return dotted-decimal IPv4 or compressed IPv6 text.
StaticfromParse an IP literal; do not resolve domain names or accept IPv6 zone IDs. Return undefined for invalid formats.
addressStaticgetQuery the local outbound address for the given family using system routing; return undefined on failure.
typeStaticgetQuery the public address asynchronously via external DNS/HTTP services. secure selects HTTPS; return undefined on failure.
timeouttypesecureStaticresolveResolve a hostname asynchronously to its first IPv4 address. Return IP literals directly, or undefined on failure.
hostname
Immutable IP address value supporting IPv4 and IPv6.