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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ts-ulm-dsl

v2.0.0

Published

Typescript library for fetching emails from the temp mail service ulm-dsl.

Downloads

14

Readme

ts-ulm-dsl

npm version npm downloads build codecov GitHub license

Typescript library for fetching emails from the temp mail service ulm-dsl.

Installation

Available on npm.

npm install ts-ulm-dsl

Usage

The following examples use the email address [email protected]. Just replace the inbox name max.mustermann to match your address.

Every method is async and therefore returns a promise. You can either use await to resolve the promise or use the .then() method to execute a callback as soon as the promise settles.

Note that you have to fetch your inbox once before you can receive emails at your address. Your address stays active for 14 days. This period renews for every request.

Initialization

Just import the client from your node_modules.

import ulmDslClient from "ts-ulm-dsl";

Get Inbox

You can fetch the basic information except the body for all emails in an inbox by calling the getInbox method and passing the inbox name.

const emails = await ulmDslClient.getInbox("max.mustermann");

Get Mail by Id

You can get all available information for a specific email by calling the getMailById method and passing the inbox name and email identifier.

const email = await ulmDslClient.getMailById("max.mustermann", 7);

Get Mails

You can get all available information for all emails in an inbox by calling the getMails method and passing the inbox name.

const emails = await ulmDslClient.getMails("max.mustermann");

API rate limits

The api is limited to about 100 requests per minute. So you should keep in mind when this client fires requests:

  • When you fetch your inbox only a single request gets fired.
  • When you fetch a specific email by id, two requests get fired. One for the basic information e.g. the sender and receiver and one for the email body.
  • When you fetch all emails a first request gets fired for the basic information of all emails and then another request per email to retrieve each email body.

So based on your inbox size you should think twice before you fetch all emails. Maybe it's better to just fetch the inbox and then retrieve a single email by id.

Related

Here are some related projects: