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
Uint8Array
into a hexadecimal string, but only if the value is notundefined
.Returns
A base-16 encoded string of the provided byte array, or
undefined
if input isundefined
.Note
It's suggested to swap the names of this function with
byteArrayJsonSerializer
for better clarity. This function handlesundefined
inputs, whilebyteArrayJsonSerializer
should handle onlyUint8Array
directly.