bytesToBool

Converts a byte array to a boolean value.

Example

import { bytesToBool } from "thirdweb/utils";
const bytes = new Uint8Array([1]);
const bool = bytesToBool(bytes);
console.log(bool); // true
function bytesToBool(
bytes_: Uint8Array,
): boolean;

Parameters

The byte array to convert.

Type

let bytes_: Uint8Array;

Optional parameters for the conversion.

Type

let opts: { size?: number };

Returns

let returnType: boolean;

The boolean value converted from the byte array.