Convert a NumLike value into a canonical Hex, so prefixed with 0x and containing an even number of lowercase hex digits (full-byte representation).
0x
The value to convert, which can be a string, number, bigint, or HexLike.
A Hex string representing the provided value, prefixed with 0x and containing an even number of lowercase hex digits.
If the normalized numeric value is negative.
const hex = numToHex(12345); // Outputs "0x3039" Copy
const hex = numToHex(12345); // Outputs "0x3039"
Convert a NumLike value into a canonical Hex, so prefixed with
0xand containing an even number of lowercase hex digits (full-byte representation).