isHex

Checks if a value is a valid hexadecimal string.

Example

import { isHex } from "thirdweb/utils";
const result = isHex("0x1a4");
console.log(result); // true

Parameters

Returns

True if the value is a valid hexadecimal string, false otherwise.