Skip to content

hexValue

hexValue(value): string

Defined in: utils/bytes.ts:559

Converts a number of different types into a hex string

Parameters

value

the value to convert into a hex string

number | bigint | BytesLike | Hexable

Returns

string

the value represented as a hex string

Examples

hexValue(39);
// '0x27'
hexValue([9, 4, 19, 4]);
// '0x9041304'