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

@plugdash/readtime

v0.2.0

Published

Estimated reading time and word count for EmDash posts

Readme

@plugdash/readtime

Word count and reading time for EmDash content. Writes readingTimeMinutes and wordCount to post metadata on publish. The EmDash equivalent of Reading Time WP.

Install

pnpm add @plugdash/readtime

Register

// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash";
import { readtimePlugin } from "@plugdash/readtime";

export default defineConfig({
  integrations: [
    emdash({
      plugins: [readtimePlugin()],
      // or sandboxed: [readtimePlugin()]
    }),
  ],
});

Configuration

Admin dashboard

After installing, open the EmDash admin and go to Plugins - Reading Time

  • Settings. All configuration options are available there. Changes take effect on the next publish - no code changes required.

astro.config.mjs

Pass config at register time. Values are seeded into KV on install and reseeded automatically when the config in code changes.

readtimePlugin({
  wordsPerMinute: 250,
  collections: ["blog", "articles"],
});

| Option | Type | Default | Description | | ---------------- | ---------- | ------- | ------------------------------------------------- | | wordsPerMinute | number | 238 | Average reading speed used for the calculation | | collections | string[] | all | Limit processing to specific collection slugs |

Set collections whenever your site has collections without a metadata field (e.g. EmDash's built-in plugins collection). Without an allowlist, readtime tries to write metadata on every content save and will log (but not throw) a "no such column: metadata" error when the target collection lacks one.

Astro theme usage

Access reading time values from the content metadata in your Astro templates:

---
const post = await emdash.content.get("posts", Astro.params.id);
const { wordCount, readingTimeMinutes } = post.data.metadata ?? {};
---

{readingTimeMinutes && <span>{readingTimeMinutes} min read</span>}
{wordCount && <span>{wordCount.toLocaleString()} words</span>}

What it does

  • Ships ReadingTime.astro - drop-in companion component with four variants
  • Fires on content:afterSave when status is published
  • Extracts plain text from Portable Text body blocks
  • Counts words (splits on whitespace)
  • Calculates reading time with a configurable WPM rate
  • Writes wordCount and readingTimeMinutes to content metadata
  • Preserves existing metadata keys from other plugins

What it does not do

  • Does not calculate reading time for drafts, archived, or scheduled content
  • Does not count words in images, embeds, or other non-text block types
  • Does not provide server-side rendering of the component - it is a client Astro component
  • Does not support per-post WPM overrides
  • Does not account for code blocks or block quotes differently