Create a byte array from a bytes-like value.
const value = createBytes('0x010203');console.log(value); // Uint8Array [ 1, 2, 3 ]const otherValue = createBytes('0x010203');console.log(otherValue); // Uint8Array [ 1, 2, 3 ]
The created byte array.
If the value is not a bytes-like value.
The value to create the byte array from.
Create a byte array from a bytes-like value.
Example
Returns
The created byte array.
Throws
If the value is not a bytes-like value.