Type Alias ConditionPredicate

ConditionPredicate: ((version: 4 | 6, isCidr: boolean) => boolean)

The type of an optional callback function used to filter out IP addresses that do not meet specific conditions.

Type declaration

    • (version, isCidr): boolean
    • Parameters

      • version: 4 | 6

        The IP version: 4 or 6. By default, both are accepted.

      • isCidr: boolean

        Indicates whether the address is a CIDR. By default, both CIDRs and non-CIDRs are accepted.

      Returns boolean

      Whether the IP address satisfies the specified condition(s).