Converts a NumLike value to a hexadecimal string.
The value to convert, which can be a string, number, bigint, or HexLike.
A Hex string representing the numeric value.
const hex = numToHex(12345); // Outputs "0x3039" Copy
const hex = numToHex(12345); // Outputs "0x3039"
Converts a NumLike value to a hexadecimal string.