toHex

Converts a value to its hexadecimal representation.

Example

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

Parameters

Returns

The hexadecimal representation of the value.