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

purechart

v0.1.0

Published

Zero-dependency, no-build SVG charts (bar, line, combo, heatmap, pie, hbar, sparkline, gauge, scatter) as pure functions plus a <purechart-chart> web component. Themeable with CSS variables.

Readme

purechart

Zero-dependency, no-build SVG charts, built security-first — for sensitive projects (internal tools, gateways, admin panels) that want the smallest possible attack surface.

Rendered with plain JavaScript: each chart type is a pure function that returns an SVG/HTML string, together with the <purechart-chart> web component. No external libraries, no build step, no install scripts. Theme/colors are fully customizable through CSS variables.

9 types: bar (stacked/grouped) · line · combo (dual axis) · heatmap · pie/donut · hbar (ranking) · sparkline · gauge · scatter.

purechart charts

Why it's secure

  • 0 runtime dependencies — installing purechart pulls in no other packages (eliminating npm's biggest supply-chain attack vector).
  • No build stepthe published files are the source in git, byte for byte: you can diff the package against a commit/tag to verify it before use.
  • No install scripts (postinstall/prepare/install) → no purechart code runs during npm i.
  • Published manually + 2FA, not via CI → no tokens sitting in GitHub Actions.

Install (ordered by safety)

1) Vendoring — safest. Copy the src/ folder into your repo (review it in a PR, pin absolutely, no network):

import { barChart } from './vendor/purechart/auto.js';   // CSS comes along automatically

2) Install from Git, pinned to a tag/commit (no npm registry needed):

npm i github:madnh/purechart#v0.1.0          # the lockfile records the exact commit SHA
npm i git+https://github.com/madnh/purechart.git#<commit-sha>

3) npm registry (convenient):

npm i purechart

Quick start

import { barChart } from 'purechart';
import 'purechart/chart.css';     // bundler; or use 'purechart/auto' for no-build

el.innerHTML = barChart(
  [{ t: 1735689600, ok: 40, error: 3 }, { t: 1735693200, ok: 52, error: 5 }],
  [{ key: 'ok', className: 'purechart-series--ok' }, { key: 'error', className: 'purechart-series--error' }],
  { stepSecs: 3600 },
);

Or fully declarative — the <purechart-chart> element renders itself from its own content (no per-element JS); data shape is { series?, config?, data }:

<purechart-chart type="bar">
  <script type="application/json">{ "series": [...], "config": {...}, "data": [...] }</script>
</purechart-chart>

📖 Full guide (every chart type, options, interaction, theme/palette): src/USAGE.md — it ships inside the package, so it's readable after install (node_modules/purechart/src/USAGE.md).

Development

  • Test: npm test (node --test, built-in) · Type-check: npm run typecheck (tsc via npx, nothing installed)
  • Check the published package: npm run pack:check · Demo: python3 -m http.server/demo.html
  • No dependencies at all — not even dev ones. Type-checking uses npx typescript on demand (not in package.json).
  • Conventions & how to add a chart: see CLAUDE.md.

Contributing & project scope

purechart is public for use, audit, and forking under the MIT license — but it is maintained solely by @madnh and does not accept outside contributions. This is deliberate: the library targets security-sensitive projects, so every line is authored and reviewed by a single maintainer as part of its threat model (it's also why releases are published manually, with no CI/GitHub Actions in the loop).

  • Issues are welcome — bug reports, questions, and ideas. They may be acted on at the maintainer's discretion.
  • Pull requests are not accepted and will be closed unmerged. No collaborators/contributors are added.
  • 🍴 Need a change now? Fork it — the MIT license lets you modify and ship your own copy freely; you just can't merge changes back upstream.

See CONTRIBUTING.md for the full policy.

License

MIT © madnh