Converts a value to a hexadecimal string representation.
Hexadecimal string representation or original string.
convertValueToHexString("255"); // "0xff"convertValueToHexString("not a number"); // "not a number"convertValueToHexString(255); // "0xff"convertValueToHexString([1, 255], 4); // "0x0001 0x00ff"convertValueToHexString(new Uint8Array([15,255]), 2); // "0x0f 0xff"
The value to convert (string, number, Uint8Array, or array of numbers).
Optional
Optional minimum length for each hex number (without prefix).
Optional prefix for each hex number (default '0x').
Generated using TypeDoc
Converts a value to a hexadecimal string representation.
Returns
Hexadecimal string representation or original string.
Example