Skip to main content

Built and signed on GitHub Actions

A simple library to encode and decode hex strings

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
76%
Published
a month ago (0.1.0)

hex

JSR CI

A simple library to encode and decode hex strings.

Usage

import * as hex from '@quentinadam/hex';

const a = hex.decode('000102'); // returns Uint8Array([0, 1, 2])

const b = hex.encode(new Uint8Array([0, 1, 2])); // returns '000102'
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@quentinadam/hex

Import symbol

import * as mod from "@quentinadam/hex";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@quentinadam/hex";

Add Package

npx jsr add @quentinadam/hex

Import symbol

import * as mod from "@quentinadam/hex";

Add Package

yarn dlx jsr add @quentinadam/hex

Import symbol

import * as mod from "@quentinadam/hex";

Add Package

pnpm dlx jsr add @quentinadam/hex

Import symbol

import * as mod from "@quentinadam/hex";

Add Package

bunx jsr add @quentinadam/hex

Import symbol

import * as mod from "@quentinadam/hex";