Skip to main content
isIPv6 - net - Node documentation
function isIPv6

Usage in Deno

import { isIPv6 } from "node:net";
isIPv6(input: string): boolean

Returns true if input is an IPv6 address. Otherwise, returns false.

net.isIPv6('::1'); // returns true
net.isIPv6('fhqwhgads'); // returns false

Parameters

input: string

Return Type

boolean