import { encodeHex } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/encoding.js";
Encodes the given data to a hex string.
Examples
Example 1
Example 1
import { encodeHex } from "@ayonli/jsext/encoding";
const hex = encodeHex("Hello, World!");
console.log(hex); // "48656c6c6f2c20576f726c6421"
const hex2 = encodeHex(new Uint8Array([72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33]));
console.log(hex2); // "48656c6c6f2c20576f726c6421"