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

emailalias

v1.0.2

Published

Official Node.js client for the EmailAlias API.

Readme

emailalias-nodejs

Official Node.js client for the EmailAlias.io REST API. TypeScript types included.

API access is a Premium feature. Generate a key from Settings → API Keys in the web dashboard.

Install

npm install emailalias
# or
yarn add emailalias
# or
pnpm add emailalias

Requires Node.js 18+ (uses the global fetch).

Quick start

import { Client } from "emailalias";

const client = new Client({
  apiKey: process.env.EMAILALIAS_API_KEY!,
});

// Create an alias
const alias = await client.createAlias({
  alias_type: "random",
  label: "Shopping",
});
console.log(alias.alias_email); // "[email protected]"

// List aliases
const aliases = await client.listAliases();
aliases.forEach((a) => console.log(a.alias_email, "→", a.destination_email));

// Forward to a verified additional destination
const workAlias = await client.createAlias({
  alias_type: "custom",
  custom_code: "work-signup",
  label: "Work",
  destination_email: "[email protected]", // must be verified on your account
});

// Send email from an alias
await client.sendEmail({
  alias_id: alias.id,
  to_email: "[email protected]",
  subject: "Hello",
  body: "Sent from my alias.",
});

// Disable an alias
await client.updateAlias(alias.id, { active: false });

Error handling

import {
  Client,
  AuthenticationError,
  RateLimitError,
  EmailAliasError,
} from "emailalias";

const client = new Client({ apiKey: "ea_live_xxx" });

try {
  await client.listAliases();
} catch (err) {
  if (err instanceof AuthenticationError) {
    // Invalid key, or account no longer Premium
  } else if (err instanceof RateLimitError) {
    // Respect X-RateLimit-Reset and retry
  } else if (err instanceof EmailAliasError) {
    console.error(err.status, err.message);
  }
}

Configuration

const client = new Client({
  apiKey: "ea_live_xxx",
  baseUrl: "https://emailalias.io", // override for staging / self-host
  timeoutMs: 30_000,
  fetchImpl: fetch, // inject a custom fetch (e.g. `undici`)
});

⚠️ Browser usage

Never put a live API key in frontend code. Any user can open devtools and read it. If you're building a browser/React app, call EmailAlias.io from your backend and proxy requests from the client, or use emailalias-react from a Next.js Route Handler / server action.

Available methods

| Method | Endpoint | |---|---| | listAliases() | GET /api/aliases | | createAlias(opts) | POST /api/aliases | | updateAlias(id, opts) | PATCH /api/aliases/{id} | | updateAliasDisplayName(id, displayName) | PATCH /api/aliases/{id}/display-name | | deleteAlias(id) | DELETE /api/aliases/{id} | | listAvailableDomains() | GET /api/aliases/domains | | listDestinations() | GET /api/destinations | | addDestination(email) | POST /api/destinations | | resendDestinationVerification(id) | POST /api/destinations/{id}/resend | | deleteDestination(id) | DELETE /api/destinations/{id} | | sendEmail({alias_id, to_email, subject, body, html_body?}) | POST /api/send-email | | listDomains() | GET /api/domains | | addDomain(name) | POST /api/domains | | verifyDomain(id) | POST /api/domains/{id}/verify | | deleteDomain(id) | DELETE /api/domains/{id} | | getDashboardStats() | GET /api/analytics/dashboard | | listLogs(page, perPage) | GET /api/analytics/logs | | listExposureEvents(page, perPage) | GET /api/analytics/exposure |

Full API reference: https://emailalias.io/documentation

License

MIT