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

orevail

v1.0.0

Published

The official Node.js / TypeScript SDK for Orevail — the stateless transactional and temporary email network.

Readme

Orevail Node.js / TypeScript SDK

The official, zero-dependency Node.js and TypeScript client library for interacting with the Orevail Developer Mail Network.

Orevail is a developer-first transactional and temporary email network. By designing routes on high-reputation domains and validating them with 2048-bit DKIM keys, Orevail allows you to test inbound mail parsing loops, run transactional flows, and mock sandbox accounts easily without getting flagged by spam-reputation checkers.


Key Features

  • Zero Dependencies: Leverages standard Node.js global fetch (available in Node 18+). No massive node module weight or dependency vulnerabilities.
  • TypeScript First: Coded entirely in TypeScript with strong type safety, autocomplete, and inline documentation out-of-the-box.
  • Serverless Ready: Lightweight construction makes it fully compatible with Serverless and Edge runtimes (Vercel Edge, Cloudflare Workers, Netlify Edge).

Installation

Install the package via npm (or yarn/pnpm):

npm install orevail

Quickstart Guide

1. Create a Sandbox Mailbox Address

Create an instantaneous virtual sandbox address. The API key is returned exactly once in this payload.

import { Orevail } from 'orevail';

async function setupSandbox() {
  // Static helper since you don't have an API key yet
  const account = await Orevail.createUser('[email protected]');
  
  console.log('Allocated Email:', account.email);
  console.log('Sandbox API Key:', account.api_key);
}

setupSandbox();

2. Initialize the Authenticated Client

Initialize the Orevail client using your sandbox key:

import { Orevail } from 'orevail';

const orevail = new Orevail({
  apiKey: 'your_orevail_api_key_here'
});

3. Send Outbound Transactions

Enqueue outbound emails into the delivery queue. Our egress workers sign your packets with 2048-bit DKIM signatures on-the-fly and route them instantly.

async function sendAlert() {
  const result = await orevail.sendEmail({
    sender: '[email protected]',
    recipient: '[email protected]',
    subject: 'Verification Alert',
    bodyText: 'Your verification key is 4458-AB',
    bodyHtml: '<p>Your verification key is <strong>4458-AB</strong></p>'
  });

  console.log(`Outbox job accepted. Job ID: ${result.jobId}`);
}

sendAlert();

4. Query & Parse Incoming Emails

Read incoming emails from your sandbox inbox (e.g. validating verification links, testing inbound webhooks, or checking template formatting).

async function fetchLatest() {
  const inbox = await orevail.getEmails('[email protected]', {
    direction: 'incoming',
    limit: 10
  });

  console.log(`Fetched ${inbox.count} messages:`);
  for (const mail of inbox.emails) {
    console.log('----------------------------------------');
    console.log('From:', mail.sender);
    console.log('Subject:', mail.subject);
    console.log('Text Content:', mail.body_text);
    
    // Check for attachments metadata
    if (mail.attachments && mail.attachments.length > 0) {
      console.log('Attachments:', mail.attachments.map(a => a.filename));
    }
  }
}

fetchLatest();

5. Download Email Attachments

Download raw file binary byte buffers associated with any received email:

import * as fs from 'fs/promises';

async function downloadInvoice(attachmentId: number) {
  const arrayBuffer = await orevail.downloadAttachment(attachmentId);
  const nodeBuffer = Buffer.from(arrayBuffer);
  
  await fs.writeFile('invoice.pdf', nodeBuffer);
  console.log('Attachment saved successfully!');
}

Error Handling

Orevail maps HTTP errors to descriptive JS classes, making testing and debugging intuitive:

import { Orevail, OrevailAuthError, OrevailAPIError } from 'orevail';

async function safeFetch() {
  try {
    const orevail = new Orevail({ apiKey: 'invalid_key' });
    await orevail.getEmails('[email protected]');
  } catch (err) {
    if (err instanceof OrevailAuthError) {
      console.error('Invalid API Key provided:', err.message);
    } else if (err instanceof OrevailAPIError) {
      console.error(`Orevail API returned ${err.statusCode}:`, err.message);
    } else {
      console.error('Network or system error:', err);
    }
  }
}

License

MIT License. Created by the Orevail Core Team.