Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/mod.ts>hexDecode

Useful snippet collection.
Go to Latest
function hexDecode
import { hexDecode } from "https://deno.land/x/simple_utility@v1.0.0/mod.ts";

Convert from hex string to binary.

Examples

Example 1

const bin = await Deno.readFile("./file");
const converted = hexEncode(bin);
const restored = hexDecode(converted);

Parameters

data: string

Returns

Uint8Array