Optional
address4Optional
elidedOptional
elisionOptional
elisionOptional
parsedReturn a zero-padded base-2 string representation of the address
Address6
var address = new Address6('2001:4860:4001:803::1011');
address.binaryZeroPad();
// '0010000000000001010010000110000001000000000000010000100000000011
// 0000000000000000000000000000000000000000000000000001000000010001'
Return an object containing the 6to4 properties of the address
Address6
Return an object containing the Teredo properties of the address
Address6
a link suitable for conveying the address via a URL hash
Optional
options: { Optional
classOptional
prefix?: stringOptional
v4?: booleanReturn the reversed ip6.arpa form of the address
Address6
Optional
options: ReverseFormOptionsStatic
fromCreate an IPv6-mapped address given an IPv4 address
Address6
var address = Address6.fromAddress4('192.168.0.1');
address.correctForm(); // '::ffff:c0a8:1'
address.to4in6(); // '::ffff:192.168.0.1'
An IPv4 address string
Static
fromReturn an address from ip6.arpa form
Address6
var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.)
address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe'
an 'ip6.arpa' form address
Static
fromConvert a BigInteger to a v6 address object
Address6
var bigInteger = new BigInteger('1000000000000');
var address = Address6.fromBigInteger(bigInteger);
address.correctForm(); // '::e8:d4a5:1000'
a BigInteger to convert
Static
fromStatic
fromURLConvert a URL (with optional port number) to an address object
Address6
var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/');
addressAndPort.address.correctForm(); // 'ffff::'
addressAndPort.port; // 8080
a URL with optional port number
Static
fromStatic
isGenerated using TypeDoc
Represents an IPv6 address
Param
An IPv6 address string
Param
How many octets to parse
Example