hexToBool

Converts a hexadecimal string to a boolean value.

Example

import { hexToBool } from "thirdweb/utils";
const bool = hexToBool("0x01");
console.log(bool); // true
function hexToBool(hex: `0x${string}`, opts: Options): boolean;

Parameters

The hexadecimal string to convert.

Type

let hex: `0x${string}`;

Optional options for the conversion.

Type

let opts: Options;

Returns

let returnType: boolean;

The boolean value corresponding to the hexadecimal string.