Function undefinedSafeByteArrayJsonSerializer

  • Serializes a Uint8Array into a hexadecimal string, but only if the value is not undefined.

    Returns

    A base-16 encoded string of the provided byte array, or undefined if input is undefined.

    Note

    It's suggested to swap the names of this function with byteArrayJsonSerializer for better clarity. This function handles undefined inputs, while byteArrayJsonSerializer should handle only Uint8Array directly.

    Parameters

    • bytes: undefined | Uint8Array

      The Uint8Array to be serialized (or undefined).

    Returns undefined | string

Generated using TypeDoc