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<ArrayBufferLike>,
opts: Options,
): boolean;

Parameters

The byte array to convert.

Type

let bytes_: Uint8Array<ArrayBufferLike>;

Optional parameters for the conversion.

Type

let opts: Options;

Returns

let returnType: boolean;

The boolean value converted from the byte array.