Port of the Go encoding/hex library.
This module is browser compatible.
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 ] Copy
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.
TextEncoder
Generated using TypeDoc
Port of the Go encoding/hex library.
This module is browser compatible.
Example