Module @ckb-cobuild/hex-encoding - v1.0.0

Port of the Go encoding/hex library.

This module is browser compatible.

Example

import {
decodeHex,
encodeHex,
} from "@ckb-cobuild/hex-encoding";

const binary = new TextEncoder().encode("abc");
const encoded = encodeHex(binary);
console.log(encoded);
// => "616263"

console.log(decodeHex(encoded));
// => Uint8Array(3) [ 97, 98, 99 ]

@ckb-cobuild/hex-encoding

Port of the Go encoding/hex and copy from Deno.

Browser Compatibility

Index

Functions

Generated using TypeDoc