Address4

lib/ipv4.js

Represents an IPv4 address

new Address4(address: string)
Parameters
address (string) An IPv4 address string
Static Members
fromHex(hex)
fromInteger(integer)
fromBigInteger(bigInteger)
Instance Members
isValid()
correctForm()
isCorrect
toHex()
toArray()
toGroup6()
bigInteger()
_startAddress()
startAddress()
startAddressExclusive()
_endAddress()
endAddress()
endAddressExclusive()
mask(optionalMask)
getBitsBase2(start, end)
isInSubnet
binaryZeroPad()

Address6

lib/ipv6.js

Represents an IPv6 address

new Address6(address: string, groups: number)
Parameters
address (string) An IPv6 address string
groups (number = 8) How many octets to parse
Example
var address = new Address6('2001::/32');
Static Members
fromBigInteger(bigInteger)
fromURL(url)
fromAddress4(address4, address)
fromArpa(arpaFormAddress)
fromByteArray(bytes)
fromUnsignedByteArray(bytes)
SCOPES
TYPES
RE_BAD_CHARACTERS
RE_BAD_ADDRESS
RE_SUBNET_STRING
RE_ZONE_STRING
Instance Members
microsoftTranscription()
mask(optionalMask, mask)
possibleSubnets(optionalSubnetSize, size)
_startAddress()
startAddress()
startAddressExclusive()
_endAddress()
endAddress()
endAddressExclusive()
getScope()
getType()
getBits(start, end)
getBitsBase2(start, end)
getBitsBase16(start, end)
getBitsPastSubnet()
reverseForm(options)
correctForm()
binaryZeroPad()
canonicalForm()
decimal()
bigInteger()
to4()
to4in6()
inspectTeredo()
inspect6to4()
to6to4()
toByteArray()
toUnsignedByteArray()
isValid()
isInSubnet
isCorrect
isCanonical
isLinkLocal
isMulticast
is4
isTeredo
is6to4
isLoopback
regularExpressionString(optionalSubString)
regularExpression(optionalSubstring, optionalSubString)
href(optionalPort: any): String
Parameters
optionalPort (any)
Returns
String: the address in link form with a default port of 80
link(options: any): String
Parameters
options (any)
Returns
String: a link suitable for conveying the address via a URL hash

Groups an address

group(): String
Returns
String:

spanAllZeroes

lib/v6/helpers.js
spanAllZeroes
Returns
String: the string with all zeroes contained in a
spanAll(s: any, optionalOffset: any): String
Parameters
s (any)
optionalOffset (any)
Returns
String: the string with each character contained in a

spanLeadingZeroes

lib/v6/helpers.js
spanLeadingZeroes(address: any): String
Parameters
address (any)
Returns
String: the string with leading zeroes contained in a

Groups an address

simpleGroup(addressString: any, offset: any): String
Parameters
addressString (any)
offset (any)
Returns
String: a grouped address