@ac-essentials/misc-util
    Preparing search index...

    Function composeInetAddress

    • Composes an InetAddress from a family and address. Validates and converts the family to ensure it is 4, 6, or null.

      Parameters

      • family: string | number | null

        The IP family, either as a string ('IPv4', 'IPv6'), number (4, 6), or null for unknown.

      • address: string

        The IP address string.

      Returns InetAddress

      An InetAddress object.

      If the family is not valid (not 'IPv4'/'IPv6' or 4/6 or null).