decodeHex
import { decodeHex } from "jsr:@ende/encoding";function
function decodeHex(src: string): Uint8Array_Decodes the given hex-encoded string. If the input is malformed, an error is thrown.
src: stringThe hex-encoded string to decode.
Returns
The decoded data.
Example: Usage
import { decodeHex } from "@ende/encoding/hex";
import { assertEquals } from "@ende/assert";
assertEquals(
decodeHex("616263"),
new TextEncoder().encode("abc"),
);