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

zero-deps-zorbs

v0.1.0

Published

Zero-dependency Zorb PFP generator. Byte-for-byte identical output to @zoralabs/zorb.

Readme

zero-deps-zorbs

Tiny, zero-dependency generator for Zora-style gradient avatars from Ethereum addresses. Drop one in anywhere a user needs a deterministic fallback PFP.

import { zorbDataURI } from 'zero-deps-zorbs';

<img src={zorbDataURI('0xd8da6bf26964af9d7eed9e03e53415d37aa96045')} alt="" />

Output is byte-for-byte identical to Zora's @zoralabs/zorb across every input we've tested (~2,300 addresses; see Verification). Bundle is 3.6 KB minified. No runtime dependencies.

What this is

A pure-function library that turns any 20-byte hex string into the same 5-stop radial-gradient SVG zorb that Zora's library produces. Three exports:

gradientForAddress(addr): [string, string, string, string, string]  // 5 hsl() stops
zorbSVG(addr): string                                                // full SVG markup
zorbDataURI(addr): string                                            // data:image/svg+xml;base64,…

Works in Node, Bun, edge runtimes, React Server Components, and the browser without any setup. No DOM required, no React peer dep, no web-component registration step — just functions.

Why this exists

Zora's @zoralabs/zorb is the original implementation. It's a Svelte-compiled web component that ships with two runtime dependencies the algorithm doesn't actually need:

  • @ethersproject/bytes — used solely to parse 0x… hex into a byte array. No keccak256, no signing, no blockchain primitives — just hex parsing, which is ~10 lines of plain JS.
  • tinycolor2 — used solely to format {h, s, l} into an hsl(H, S%, L%) string. No color picking, no manipulation — just string formatting (with one HSL→RGB→HSL roundtrip we replicate exactly).

It also bundles the Svelte runtime to provide a <zora-zorb> custom element, which is great if you want a custom element but pure overhead if you just want the SVG.

zero-deps-zorbs is a re-implementation that strips all of that. The gradient math and SVG template are ported verbatim from upstream's lib.ts and zorbImageDataURI.ts so output matches byte-for-byte; the two dependencies are replaced inline (bytes.ts, hsl.ts). The result is a 3.6 KB bundle with zero dependencies in package.json, suitable as a fallback PFP on any site without dragging in a Svelte runtime or an Ethereum library.

If you want the original web component or you're already inside a Zora app, use @zoralabs/zorb. If you want pure functions in a tiny bundle, use this.

Install

npm i zero-deps-zorbs

Use

import { zorbDataURI, zorbSVG, gradientForAddress } from 'zero-deps-zorbs';

// drop into <img>
<img src={zorbDataURI('0xd8da6bf26964af9d7eed9e03e53415d37aa96045')} alt="" />

// or render the SVG inline
element.innerHTML = zorbSVG('0xd8da…');

// or get the raw 5-stop HSL gradient
const [c0, c1, c2, c3, c4] = gradientForAddress('0xd8da…');

Inputs are case-insensitive (mirrors arrayify's behaviour). Anything that's not a 0x-prefixed even-length hex string throws — same contract as upstream.

Verification

The whole point of this package is identical output. That promise is enforced by four independent checks, all run in CI:

| Layer | Command | What it does | |---|---|---| | 1. Parity tests | npm test | Vitest imports the real @zoralabs/zorb and asserts gradientForAddress, zorbDataURI, and the decoded SVG match across ~2,300 inputs. ~4,800 assertions; any single divergence fails the suite. | | 2. Parity report | npm run compare | Same corpus, but collects every divergence into reports/parity-report.md. Exits non-zero on any mismatch. | | 3. Visual report | npm run build-visual | Renders 50 upstream-vs-ours pairs side-by-side in reports/visual.html with auto match/DIFFER indicators. | | 4. Bundle audit | npm run audit-dist | Greps dist/ for ethers, tinycolor, keccak, etc. Fails if any leaked, if size > 5 KB, or if package.json's dependencies is non-empty. |

The corpus (test/corpus.ts) is fully deterministic: edge addresses (0x00…00, 0xff…ff, alternating-bit patterns), famous addresses, 2,000 Mulberry32-seeded pseudo-random addresses, and 100 addresses' worth of case variants. Same seed → same corpus → same result every run.

Run everything end-to-end:

npm run verify

Credit

The gradient algorithm and the SVG template come from Zora's @zoralabs/zorb — MIT licensed, copyright Zora Labs. This package is a re-implementation, not a fork: it ships none of the upstream's runtime code, but the mathematical behaviour is preserved exactly so the output is interchangeable.

If you ship zero-deps-zorbs, you're shipping Zora's design and Zora's algorithm. Please credit them.

License

MIT.