Skip to main content

Built and signed on GitHub Actions

Utilities for encoding and decoding common formats like hex, base64, and varint

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
100%
Published
2 months ago (1.0.5)

Utilities for encoding and decoding common formats like hex, base64, and varint.

import { encodeBase64, decodeBase64 } from "@std/encoding";
import { assertEquals } from "@std/assert";

const foobar = new TextEncoder().encode("foobar");
assertEquals(encodeBase64(foobar), "Zm9vYmFy");
assertEquals(decodeBase64("Zm9vYmFy"), foobar);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@std/encoding

Import symbol

import * as encoding from "@std/encoding";

---- OR ----

Import directly with a jsr specifier

import * as encoding from "jsr:@std/encoding";

Add Package

npx jsr add @std/encoding

Import symbol

import * as encoding from "@std/encoding";

Add Package

yarn dlx jsr add @std/encoding

Import symbol

import * as encoding from "@std/encoding";

Add Package

pnpm dlx jsr add @std/encoding

Import symbol

import * as encoding from "@std/encoding";

Add Package

bunx jsr add @std/encoding

Import symbol

import * as encoding from "@std/encoding";