MCPcopy Create free account
hub / github.com/denoland/std / decodeHex

Function decodeHex

encoding/unstable_hex.ts:147–154  ·  view source on GitHub ↗
(
  input: string | Uint8Array_,
)

Source from the content-addressed store, hash-verified

145 * ```
146 */
147export function decodeHex(
148 input: string | Uint8Array_,
149): Uint8Array_ {
150 if (typeof input === "string") {
151 input = new TextEncoder().encode(input) as Uint8Array_;
152 }
153 return input.subarray(0, decode(input, 0, 0, rAlphabet));
154}

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.90

Tested by

no test coverage detected