Docs

hexToNumber

Converts a hexadecimal string to a number.

Example

import { hexToNumber } from "thirdweb/utils";
const number = hexToNumber("0x1a4");
console.log(number); // 420

Parameters

Returns

The converted number.