Represents an IPv4 address

Param

An IPv4 address string

Hierarchy

  • Address4

Constructors

  • Parameters

    • address: string

    Returns Address4

Properties

address: string
addressMinusSuffix?: string
groups: number
isCorrect: ((this: Address4 | Address6) => boolean)

Type declaration

    • (this: Address4 | Address6): boolean
    • Returns true if the address is correct, false otherwise

      Memberof

      Address4

      Instance

      Returns

      Parameters

      Returns boolean

isInSubnet: ((this: Address4 | Address6, address: Address4 | Address6) => boolean)

Type declaration

parsedAddress: string[]
parsedSubnet: string
subnet: string
subnetMask: number
v4: boolean

Methods

  • Helper function getting end address.

    Memberof

    Address4

    Instance

    Returns

    Returns BigInteger

  • Helper function getting start address.

    Memberof

    Address4

    Instance

    Returns

    Returns BigInteger

  • Returns the address as a BigInteger

    Memberof

    Address4

    Instance

    Returns

    Returns BigInteger

  • Returns a zero-padded base-2 string representation of the address

    Memberof

    Address4

    Instance

    Returns

    Returns string

  • Returns the correct form of an address

    Memberof

    Address4

    Instance

    Returns

    Returns string

  • The last address in the range given by this address' subnet Often referred to as the Broadcast

    Memberof

    Address4

    Instance

    Returns

    Returns Address4

  • The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address

    Memberof

    Address4

    Instance

    Returns

    Returns Address4

  • Returns the bits in the given range as a base-2 string

    Memberof

    Address4

    Instance

    Returns

    Parameters

    • start: number
    • end: number

    Returns string

  • Groups an IPv4 address for inclusion at the end of an IPv6 address

    Returns

    Returns string

  • Returns true if the given address is a multicast address

    Memberof

    Address4

    Instance

    Returns

    Returns boolean

  • Returns the first n bits of the address, defaulting to the subnet mask

    Memberof

    Address4

    Instance

    Returns

    Parameters

    • Optional mask: number

    Returns string

  • Parameters

    • address: string

    Returns string[]

  • The first address in the range given by this address' subnet. Often referred to as the Network Address.

    Memberof

    Address4

    Instance

    Returns

    Returns Address4

  • The first host address in the range given by this address's subnet ie the first address after the Network Address

    Memberof

    Address4

    Instance

    Returns

    Returns Address4

  • Converts an IPv4 address object to an array of bytes

    Memberof

    Address4

    Instance

    Returns

    Returns number[]

  • Converts an IPv4 address object to an IPv6 address group

    Memberof

    Address4

    Instance

    Returns

    Returns string

  • Converts an IPv4 address object to a hex string

    Memberof

    Address4

    Instance

    Returns

    Returns string

  • Converts a BigInteger to a v4 address object

    Memberof

    Address4

    Static

    Returns

    Parameters

    • bigInteger: BigInteger

      a BigInteger to convert

    Returns Address4

  • Converts a hex string to an IPv4 address object

    Memberof

    Address4

    Static

    Returns

    Parameters

    • hex: string

      a hex string to convert

    Returns Address4

  • Converts an integer into a IPv4 address object

    Memberof

    Address4

    Static

    Returns

    Parameters

    • integer: number

      a number to convert

    Returns Address4

  • Parameters

    • address: string

    Returns boolean

Generated using TypeDoc