Parses the given IPv6 address into its hextets representation.
The IPv6 address to parse, which can be in string, bigint, or hextets array format.
An array of eight numbers representing the hextets of the IPv6 address.
import { ipv6 } from 'cidr-block';ipv6.parseHextets("2001:db8::1"); // [0x2001, 0xdb8, 0, 0, 0, 0, 0, 1]ipv6.parseHextets("::"); // [0, 0, 0, 0, 0, 0, 0, 0]ipv6.parseHextets(42540766411282592856903984951653826561n); // [0x2001, 0xdb8, 0, 0, 0, 0, 0, 1] Copy
import { ipv6 } from 'cidr-block';ipv6.parseHextets("2001:db8::1"); // [0x2001, 0xdb8, 0, 0, 0, 0, 0, 1]ipv6.parseHextets("::"); // [0, 0, 0, 0, 0, 0, 0, 0]ipv6.parseHextets(42540766411282592856903984951653826561n); // [0x2001, 0xdb8, 0, 0, 0, 0, 0, 1]
If the input is not a valid IPv6 address.
Parses the given IPv6 address into its hextets representation.