Bytes.toBoolean
Decodes a Bytes.Bytes
into a boolean.
Imports
Named
import { Bytes } from 'ox'
Examples
import { Bytes } from 'ox'
Bytes.toBoolean(Bytes.from([1]))
// @log: true
Definition
function toBoolean(
bytes: Bytes,
options?: toBoolean.Options,
): boolean
Source: src/Bytes.ts
Parameters
bytes
- Type:
Bytes
The Bytes.Bytes
to decode.
options
- Type:
toBoolean.Options
- Optional
Decoding options.
options.size
- Type:
number
- Optional
Size of the bytes.
Return Type
Decoded boolean.
boolean