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

@tufte/markdown-it-chart

v0.2.0

Published

markdown-it plugin: render ```chart fenced blocks as Tufte-style ASCII charts.

Readme

@tufte/markdown-it-chart

A markdown-it plugin that renders ```chart fenced blocks as Tufte-style ASCII charts. Powers any markdown-it pipeline — VitePress, Eleventy, and many CMSs.

import MarkdownIt from "markdown-it";
import chart from "@tufte/markdown-it-chart";

const md = new MarkdownIt().use(chart);

md.render(`
\`\`\`chart
hbar "Revenue by Quarter ($M)"
Q1, 36
Q2, 43
Q3, 30
Q4, 52
\`\`\`
`);

Produces <pre class="tufte-chart">…</pre> containing the rendered chart.

Options

| Option | Default | Description | | ----------- | -------------- | --------------------------------- | | className | tufte-chart | CSS class on the <pre> wrapper. |

A code block whose info string is chart is rendered as a chart; every other fence renders normally. A spec that fails to parse falls back to a plain code block, so a typo never breaks the page.

Inline sparklines

A sparkline is a single line, so it also works inline. A one-backtick `sparkline: 12 24 36` span renders to a <code class="tufte-chart-spark"> of glyphs (▁▅█), with the source kept as title/aria-label. Any other inline code is left untouched.

Use from a CDN

This plugin is ESM, so it loads directly in the browser. It has a peer dependency on markdown-it and depends on @tufte/chart-core; use esm.sh's ?bundle so those load in a single request.

// esm.sh — bundles markdown-it + @tufte/chart-core in one request
import MarkdownIt from "https://esm.sh/markdown-it@14?bundle";
import chart from "https://esm.sh/@tufte/[email protected]?bundle";

const md = new MarkdownIt().use(chart);

// jsDelivr serves the raw source (you resolve deps yourself)
// import chart from "https://cdn.jsdelivr.net/npm/@tufte/[email protected]/src/index.js";

npm-backed CDNs (esm.sh, jsDelivr, unpkg) mirror npm automatically, so they require the package to be published to npm first.

The zero-dependency renderer alone is also self-hosted on tufte.ai if you only need ASCII output: import { render } from "https://tufte.ai/[email protected]".

See @tufte/chart-core for the chart format.