edgeport - v1.0.6
    Preparing search index...

    Function formatIpv6

    • Formats 16 octets as a canonical compressed IPv6 string.

      The longest run of zero groups (of length two or more) is collapsed to ::; each remaining group is lowercase hex with no leading zeros.

      Parameters

      • bytes: Uint8Array

        Exactly 16 octets.

      Returns string

      The compressed IPv6 text (e.g. 2001:db8::1).

      If bytes is not 16 octets long.

      1.0.4

      import { formatIpv6 } from 'edgeport/dns';

      formatIpv6(new Uint8Array(16)); // '::'