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

substack-email-distribution

v1.1.2

Published

```

Readme


   SSSSSSSSSSSSSSS EEEEEEEEEEEEEEEEEEEEEEDDDDDDDDDDDDD
 SS:::::::::::::::SE::::::::::::::::::::ED::::::::::::DDD
S:::::SSSSSS::::::SE::::::::::::::::::::ED:::::::::::::::DD
S:::::S     SSSSSSSEE::::::EEEEEEEEE::::EDDD:::::DDDDD:::::D
S:::::S              E:::::E       EEEEEE  D:::::D    D:::::D
S:::::S              E:::::E               D:::::D     D:::::D
 S::::SSSS           E::::::EEEEEEEEEE     D:::::D     D:::::D
  SS::::::SSSSS      E:::::::::::::::E     D:::::D     D:::::D
    SSS::::::::SS    E:::::::::::::::E     D:::::D     D:::::D
       SSSSSS::::S   E::::::EEEEEEEEEE     D:::::D     D:::::D
            S:::::S  E:::::E               D:::::D     D:::::D
            S:::::S  E:::::E       EEEEEE  D:::::D    D:::::D
SSSSSSS     S:::::SEE::::::EEEEEEEE:::::EDDD:::::DDDDD:::::D
S::::::SSSSSS:::::SE::::::::::::::::::::ED:::::::::::::::DD
S:::::::::::::::SS E::::::::::::::::::::ED::::::::::::DDD
 SSSSSSSSSSSSSSS   EEEEEEEEEEEEEEEEEEEEEEDDDDDDDDDDDDD

What is this?

This is a small script that goes through the list of your Substack email subscribers and creates a distribution table for the domain names.

  • ☑️ No dependency. Uses Node's native CVS parser
  • ☑️ Easy to audit: just one file
  • ☑️ Works directly from the command line. No need to clone the repo.

Why does this exist?

This helps get an understanding of where your subcribers are. The interesting data is in the long tail of 1-2 subs from domains like amazon.com or microsoft.com.

In the age of AI, do we really need a script like this? I'd argue yes for 2 reasons:

  1. Subscriber email address is PII (personally identifiable information) and they'll be thankful if this info isn't shared with some cloud AI provider

  2. Using AI for such a simple task is like using a machine gun to kill a mosquito! This script can handle millions of records because it only processes one line at a time.

Since the output is scraped from PII, you can feed it to AI. As a bonus, the output of this script burns much less tokens because it aggregates multiple users from the same domain.

How to use it?

You need to have Node.js installed.

Go to Substack Dasbhboard and export all subscribers then run the following command:

npx -format table substack-email-distribution path/to/file.csv

npx is part of Node.js which is available out of the box.

Tip: the result can be quite long. You may want to forward the output to a file by appending this to your command: > myfile.txt

You can also specify a format with --format or -f which can be:

  • table: (default)
  • json: json object where key is the email domain and value is the frequency of that domain
  • csv: comma separated values (for for spreadsheets, but if you're proficient in spreadsheets you probably don't need this script!)
  • tsv: tab separated values (good for bash processing)

The full list of options can be seen using -h option.

--format table:

┌───────────────────────────────────┬───────┐
│ (index)                           │ Count │
├───────────────────────────────────┼───────┤
│ gmail.com                         │ 13069 │
│ hotmail.com                       │ 335   │
│ yahoo.com                         │ 268   │
│ outlook.com                       │ 221   │
│ icloud.com                        │ 209   │
...

--format json:

{
  "gmail.com": 13069,
  "hotmail.com": 335,
  "yahoo.com": 268,
  "outlook.com": 221,
  "icloud.com": 209,
  ...

--format csv:

gmail.com,13069
hotmail.com,335
yahoo.com,268
outlook.com,221
icloud.com,209
...

--format tsv:

gmail.com	13069
hotmail.com	335
yahoo.com	268
outlook.com	221
icloud.com	209
...

Requirement

Node v24+.