5.9.0
Represents an IPv4 address
(string)
An IPv4 address string
Returns the address as a BigInteger
BigInteger
:
Helper function getting start address.
BigInteger
:
Helper function getting end address.
BigInteger
:
Returns true if the given address is in the subnet of the current address
boolean
:
Represents an IPv6 address
var address = new Address6('2001::/32');
Convert a BigInteger to a v6 address object
(BigInteger)
a BigInteger to convert
Address6
:
var bigInteger = new BigInteger('1000000000000');
var address = Address6.fromBigInteger(bigInteger);
address.correctForm(); // '::e8:d4a5:1000'
Return an address from ip6.arpa form
(string)
an 'ip6.arpa' form address
Adress6
:
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'
Represents IPv6 address scopes
Represents IPv6 address types
A regular expression that matches bad characters in an IPv6 address
A regular expression that matches an incorrect IPv6 address
A regular expression that matches an IPv6 subnet
A regular expression that matches an IPv6 zone
Helper function getting start address.
BigInteger
:
Helper function getting end address.
BigInteger
:
Return the bits in the given range as a BigInteger
(any)
(any)
BigInteger
:
Return a zero-padded base-2 string representation of the address
String
:
var address = new Address6('2001:4860:4001:803::1011');
address.binaryZeroPad();
// '0010000000000001010010000110000001000000000000010000100000000011
// 0000000000000000000000000000000000000000000000000001000000010001'
Return the address as a BigInteger
BigInteger
:
Returns true if the given address is in the subnet of the current address
boolean
:
Returns true if the address is in the canonical form, false otherwise
boolean
:
Returns true if the address is a link local address, false otherwise
boolean
:
Returns true if the address is a multicast address, false otherwise
boolean
:
Returns true if the address is a Teredo address, false otherwise
boolean
:
Returns true if the address is a loopback address, false otherwise
boolean
:
(any)
String
:
the address in link form with a default port of 80
(any)
String
:
a link suitable for conveying the address via a URL hash
Groups an address
String
:
String
:
the string with all zeroes contained in a
(any)
(any)
String
:
the string with each character contained in a
(any)
String
:
the string with leading zeroes contained in a
Groups an address
(any)
(any)
String
:
a grouped address