API reference › @evolu/common › Bytes › bytesToHex
function bytesToHex(bytes: Uint8Array): string;
Defined in: packages/common/src/Bytes.ts:76
Encodes bytes as lowercase hexadecimal text, two digits per byte.
uint8ArrayToHex returns the same text branded as Hex.
Example
import { assertEqual, bytesToHex } from "@evolu/common";
assertEqual(bytesToHex(new Uint8Array([0, 202, 254])), "00cafe");