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-utils-kit

v1.0.3

Published

Lightweight and powerful email analysis toolkit for Node.js and TypeScript. Validates format, disposable emails, role-based addresses, public providers and MX records.

Readme

email-utils-kit

A lightweight and powerful email analysis toolkit for Node.js and TypeScript. email-utils-kit helps you validate and inspect email addresses with a single API. It checks format validity, disposable providers, role-based mailboxes, public email services and MX records.

Perfect for signup validation, authentication flows, form verification and backend email filtering.


What it does

  • Detects disposable emails
  • Detects role-based addresses like admin, support, info
  • Checks if email is from a public provider (Gmail, Outlook, Yahoo)
  • Verifies MX records
  • Validates email format
  • Fully typed for TypeScript

Why use it?

  • Simple and intuitive API
  • Accurate provider detection
  • Fast MX lookup
  • Works in any Node.js environment
  • Zero configuration

Installation

npm install email-utils-kit

or

yarn add email-utils-kit

Quick Start

import { analyzeEmail } from "email-utils-kit";

const result = await analyzeEmail("[email protected]");

console.log(result);

Output:

{
  "input": "[email protected]",
  "validFormat": true,
  "disposable": false,
  "roleBased": false,
  "publicProvider": true,
  "hasMx": true
}

API Overview

1. analyzeEmail(email: string)

Runs the full validation pipeline.

import { analyzeEmail } from "email-utils-kit";

const info = await analyzeEmail("[email protected]");

Returns:

interface EmailAnalysisResult {
  input: string;
  validFormat: boolean;
  disposable: boolean;
  roleBased: boolean;
  publicProvider: boolean;
  hasMx: boolean;
}

2. isValidEmailFormat(email: string)

Checks only the email format.

import { isValidEmailFormat } from "email-utils-kit";

isValidEmailFormat("[email protected]"); // true

3. isDisposable(email: string)

Detects whether an email is from a disposable provider.

import { isDisposable } from "email-utils-kit";

isDisposable("[email protected]"); // true

4. isRoleEmail(email: string)

Detects role-based mailboxes like admin, info, support, sales.

import { isRoleEmail } from "email-utils-kit";

isRoleEmail("[email protected]"); // true

5. isPublicProvider(email: string)

Checks if email is from a well-known public provider like Gmail or Yahoo.

import { isPublicProvider } from "email-utils-kit";

isPublicProvider("[email protected]"); // true

6. hasValidMX(email: string)

Looks up DNS MX records to check deliverability.

import { hasValidMX } from "email-utils-kit";

await hasValidMX("[email protected]"); // true or false

Usage Example: Form Validation

import { analyzeEmail } from "email-utils-kit";

async function validateSignup(email: string) {
  const result = await analyzeEmail(email);

  if (!result.validFormat) return "Invalid email format";
  if (result.disposable) return "Disposable emails are not allowed";
  if (result.roleBased) return "Role-based emails are not allowed";
  if (!result.hasMx) return "Email does not have valid MX records";

  return "Valid email";
}

TypeScript Support

This package ships with full TypeScript definitions:

import type { EmailAnalysisResult } from "email-utils-kit";

License

MIT © Diptendu Barman