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

emailable

v3.0.6

Published

Email Verification that's astonishingly easy and low-cost. See https://emailable.com for details.

Downloads

2,945

Readme

Emailable Node Library

Version Build Status Maintainability Downloads Try on RunKit

This is the official node wrapper for the Emailable API.

Documentation

See the Node API docs.

Installation

Install the package with:

npm install emailable --save
# or
yarn add emailable

Usage

The library needs to be configured with your account's API key which is available in your Emailable Dashboard. Require it with your API key:

Setup

// require with API key
var emailable = require('emailable')('live_...')

// ES6 import
import Emailable from 'emailable';
const emailable = Emailable('live_...');

Verification

// verify an email address
emailable.verify('[email protected]')
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });

Additional options

You can also pass any of the additional options as a second parameter to verify.

emailable.verify('[email protected]', { timeout: 10 })
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });

Slow Email Server Handling

Some email servers are slow to respond. As a result the timeout may be reached before we are able to complete the verification process. If this happens, the verification will continue in the background on our servers. We recommend sleeping for at least one second and trying your request again. Re-requesting the same verification with the same options will not impact your credit allocation within a 5 minute window.

{
  message: 'Your request is taking longer than normal. Please send your request again.'
}

Batch Verification

Start a batch

var emails = ['[email protected]', '[email protected]', ...]
emailable.batches.verify(emails)
  .then(function (response) {
    console.log(response.id);
  });
Additional options

You can also pass any of the additional options as a second parameter to verify.

emailable.batches.verify(emails, { url: 'https://emailable.com/' }).
  then(function (response) {
    console.log(response.id);
  });

Get the status / results of a batch

Calling batches.status with the batch id will return the batch's status. This will also return the results once the batch is complete.

var id = '5cfcbfdeede34200693c4319'
emailable.batches.status(id)
  .then(function (response) {
    console.log(response);
  });

Development

Run all tests:

$ yarn install
$ yarn test

If you do not have yarn installed, you can get it with npm install --global yarn.

Run a single test suite without a coverage report:

$ yarn test test/verify.spec.js

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/emailable/emailable-node.