coerce.toBytes
This function converts the specified value to bytes.
Syntax
coerce.toBytes(value)
Arguments
Argument |
Type |
Description |
---|---|---|
value |
any |
The value to be coerced. |
Returns
Type |
Description |
---|---|
bytes |
The coerced byte value. |
Examples
The function coerce.toBytes("hello")
returns byte data.