npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bytepeel

v0.1.2

Published

Peel layers of encoding off binary data (hex, base64, PEM, JWT, gzip, zstd, protobuf, DER/ASN.1, CBOR, MessagePack) and edit it in place. A WebAssembly library plus the bytepeel CLI and MCP server (npx bytepeel mcp).

Readme

bytepeel

Peel layers of encoding off binary data, and edit it in place: hex, xxd/hexdump dumps, base64, PEM (incl. bundles), JWT, gzip/zlib/zstd, DER/ASN.1, CBOR, MessagePack and schemaless protobuf.

This package is two things:

  • The bytepeel command (the CLI and its MCP server), run from the native binary for your platform, which npm installs as an optional dependency (Linux x64/arm64, macOS x64/arm64, Windows x64):

    echo 1a03089601 | npx bytepeel --format tree
    npx -y bytepeel mcp          # MCP server on stdio, for agents

    See the main README for the CLI and the MCP tools.

  • A JavaScript library, documented below. (The JSR package is the library only.)

Library

One bytepeel.wasm with no imports and no JS dependencies; runs in Node (≥18), Deno, Bun and browsers.

npm install bytepeel              # npm (Node, Bun, bundlers)
deno add jsr:@pinta365/bytepeel   # JSR (Deno; also npx jsr add for Node)

The JSR package imports from "@pinta365/bytepeel" and has the same API.

import { load, raw, BytepeelError } from "bytepeel";

const bp = await load();

bp.peel("ChRTR1ZzYkc4c0lIZHZjbXhrSVNFPRAq");   // the decoded tree (object)
bp.tree("1a03089601");                          // the text outline
bp.get(pem, "0.0.5.2.0.1").value;               // "ISRG Root X2"
bp.getRaw("1a03089601", "3.1");                 // Uint8Array [0x96, 0x01]

// Edits return the data in its original outer format (hex stays hex, PEM
// stays PEM, ...), with every other byte preserved. Each edit is verified.
const out = bp.edit("08 96 01 12 03 66 6f 6f", [
  { add: "3", value: 42 },
  { del: "2" },
]);
new TextDecoder().decode(out);                  // "08 96 01 18 2a"
  • Options (all methods): { in: "auto"|"hex"|"base64"|"raw", as: "protobuf"|"der"|"cbor"|"msgpack"|"text"|"bytes", depth, alts, max_items }.
  • Input: a string (UTF-8) or Uint8Array/ArrayBuffer/typed array.
  • Values are typed: a string is text (never parsed, so "42" is the text 42); an integer number or a bigint is an integer; other numbers are floats; true/false/null; a Uint8Array is bytes. Use raw("sint:-2"), raw("float:1") for the CLI value syntax.
  • 64-bit integers are JSON strings in peel/get output, so they never lose precision.
  • Errors throw BytepeelError with the CLI's stable code (e.g. PATH_NOT_FOUND) and offset.
  • Loading: from npm, load() reads bytepeel.wasm next to index.js (a file read in Node/Deno/Bun, fetch over HTTP). The JSR package embeds the module, so load() needs no file or network access (no Deno permissions). Pass the bytes, a URL, a Response, or a compiled WebAssembly.Module to load it yourself.

The JSON schema, paths and edit rules are in docs/DESIGN.md.

Building

rustup target add wasm32-unknown-unknown
npm run build      # cargo build --profile wasm ...; copies bytepeel.wasm here and
                   # writes bytepeel_wasm.js (the module as base64, for JSR)
npm test           # node --test; also: deno test --allow-read test/, bun test test/