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

streaming-markdown-component

v0.1.5

Published

<streaming-md> custom element that streams markdown using streaming-markdown

Readme

streaming-markdown-component

Minimal custom element <streaming-md> for progressively rendering streamed Markdown in the browser. Internally powered by the excellent Streaming Markdown library.

Thanks and Credits

Huge thanks to the Streaming Markdown project for the streaming parser and default renderer that make this possible. Please check out and support the project: Streaming Markdown docs.

Install

npm install streaming-markdown-component
# or
pnpm add streaming-markdown-component
# or
yarn add streaming-markdown-component

Usage

<script type="module">
  import 'streaming-markdown-component/dist/index.js'
</script>

<streaming-md id="md"></streaming-md>

<script type="module">
  const el = document.getElementById('md')
  el.appendChunk('# Hello, streamed world!\n\n')
  el.appendChunk('- One\n- Two\n- Three\n')
  el.finish()
</script>

Works great with htmx SSE:

<article
  hx-ext="sse"
  sse-connect="/party/ROOM/messages/MSG"
  sse-swap="message"
  hx-swap="beforeend"
  hx-target="find streaming-md"
  sse-close="finished">
  <streaming-md></streaming-md>
  <!-- htmx appends data: chunks here; the element consumes text nodes -->
  <!-- server should send: event: message / data: ... and event: finished when done -->
  <!-- Reference: https://thetarnav.github.io/streaming-markdown/ -->
</article>

API

  • appendChunk(text: string): Append raw markdown chunk.
  • finish(): Flush and mark complete.
  • reset(): Clear content and restart.

Demo

Open demo.html locally in a browser. It imports dist/index.js and streams predefined Markdown chunks into <streaming-md>.

GitHub Pages

  • The repo includes docs/index.html. CI builds the component and copies dist/ into docs/dist/.
  • Pages workflow .github/workflows/pages.yml deploys the docs/ directory on pushes to main (and on manual dispatch).
  • After enabling GitHub Pages (GitHub → Settings → Pages → Source: GitHub Actions), your demo will be available at:
    • https://<yourname>.github.io/<repo>/

Development

bun install
bun run build
# outputs ESM at dist/index.js

Publish

This package ships ESM for the browser and uses Bun for publishing via GitHub Actions.

  • CI: On tag push like v0.1.0 (or manual dispatch), the workflow builds with Bun and runs bun publish to npm. Set NPM_TOKEN in repo secrets.
  • Local: you can also publish from your machine with Bun:
bun run build
bun publish --access public

License

MIT