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

email-safe-gaurd

v1.0.6

Published

A simple, fast, and robust email verification library for Node.js.

Readme

email-safe-gaurd

A simple, fast, and robust email verification library for Node.js.


Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need to have Node.js installed on your machine.

Usage

The primary function for verifying an email is EmailVerifier.verify().

  1. Import the class: First, import the EmailVerifier class from the email-safe-gaurd package.

    import { EmailVerifier } from 'email-safe-gaurd';
  2. Call the verify method: The verify method is an async static method on the EmailVerifier class. You need to pass the email address you want to check as a string.

    const emailToCheck = "[email protected]";
    const result = await EmailVerifier.verify(emailToCheck);

Understanding the Result

The verify method returns a Promise that resolves to an object with the following structure:

  • isValid (boolean): true if the email is valid, otherwise false.
  • reason (string, optional): If isValid is false, this field will contain the reason for the failure.

Possible failure reasons are:

  • "INVALID_INPUT": The input was not a string or was empty.
  • "INVALID_SYNTAX": The email address does not conform to standard syntax.
  • "DISPOSABLE_DOMAIN": The email domain is from a known disposable email provider.
  • "NO_MX_RECORDS": The domain does not have valid MX (Mail Exchange) records.

Example

Here is a complete example of how to use the function and handle the result:

import { EmailVerifier } from 'email-safe-gaurd';

async function checkEmail(email) {
  const result = await EmailVerifier.verify(email);

  if (result.isValid) {
    console.log(`✅ Email "${email}" is valid.`);
  } else {
    console.log(`❌ Email "${email}" is invalid. Reason: ${result.reason}`);
  }
}

// --- Try it out ---
checkEmail("[email protected]");
checkEmail("[email protected]");
checkEmail("[email protected]");