node-cooper - v0.2.0
    Preparing search index...

    Class export=

    A parsed IPv4 address with an optional CIDR prefix -- CASC.md ยง6.7's 127.0.0.1 / 10.0.0.0/8. Mirrors Cooper.IPv4: the constructor is the same validation a bare literal gets at load time, so an out-of-range octet or prefix is an error, never a silently accepted value.

    Node has no native address object (node:net works with strings), so the conversion helpers are toString() / IPv4.parse().

    Index
    • Parameters

      • address: readonly number[]

        four octets, each 0..255

      • Optionalprefix: number | null = null

        0..32, or null for a plain address

      Returns IPv4

    address: readonly number[]
    prefix: number | null
    • Whether other's address falls within this block.

      Parameters

      Returns boolean