CCC Docs
    Preparing search index...
    • Converts a NumLike value to a hexadecimal string.

      Parameters

      • val: NumLike

        The value to convert, which can be a string, number, bigint, or HexLike.

      Returns `0x${string}`

      A Hex string representing the numeric value.

      const hex = numToHex(12345); // Outputs "0x3039"