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.
Serializes a
Uint8Arrayinto a hexadecimal string, but only if the value is notundefined.Returns
A base-16 encoded string of the provided byte array, or
undefinedif input isundefined.Note
It's suggested to swap the names of this function with
byteArrayJsonSerializerfor better clarity. This function handlesundefinedinputs, whilebyteArrayJsonSerializershould handle onlyUint8Arraydirectly.