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 🙏

© 2025 – Pkg Stats / Ryan Hefner

substack-subscriber

v1.0.0

Published

Unofficial package to subscribe users to Substack newsletters

Readme

Substack Subscriber

This is an unofficial Node.js package that helps you subscribe users to your Substack newsletters.

Disclaimer

This is not an official Substack API and I am not affiliated with Substack in any way. Use this package at your own risk.

Installation

You can install the package via npm:

npm install substack-subscriber

Usage

Example Code:

const { subscribe } = require('substack-subscriber');

const email = '[email protected]';
const substackUrl = 'https://your-substack-url';

subscribe(email, substackUrl)
  .then(response => {
    console.log('Subscribed successfully:', response);
  })
  .catch(error => {
    console.error('Error subscribing:', error);
  });

Parameters:

  • email: The email address of the user you want to subscribe.
  • substackUrl: The URL of the Substack newsletter to subscribe to.

Example Response:

When the subscription is successful, you'll receive a response similar to this:

{
  "email": "[email protected]",
  "prompt_to_login": false,
  "requires_confirmation": true,
  "subscription_id": 674300000,
  "didSignup": false,
  "hasAppInstalled": false
}
  • email: The email address that was used for subscription.
  • prompt_to_login: A boolean indicating whether the user needs to log in.
  • requires_confirmation: A boolean indicating whether the user needs to confirm their subscription.
  • subscription_id: The ID associated with the subscription.
  • didSignup: A boolean indicating whether the user has completed the sign-up process.
  • hasAppInstalled: A boolean indicating whether the user has the Substack app installed.

Note: If the value of requires_confirmation is true, the subscriber will need to click the confirmation link in their email before they are added to the newsletter.

License

This project is licensed under the MIT License - see the LICENSE file for details.