Socket
Book a DemoInstallSign in
Socket

throwaway-email

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

throwaway-email

A blazing-fast email validator and disposable email detector, powered by automated disposable domain aggregation.

0.0.1-2025.7.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Throwaway - The Fastest Email Validator & Disposable Email Checker

GitHub Actions Workflow Status GitHub License NPM Unpacked Size NPM Version

A high-performance email validation library featuring real-time disposable email detection. Our database is continuously updated through automated aggregation of disposable domains from trusted community sources.

Currently 183,510 known disposable domains detected, this updates every week.

This project automatically maintains its disposable email domain list through workflows and scraping, but relies on open-source contributions to keep scrapers and filters up-to-date—learn how to help.

Installation & Usage

While this is primarily a Node.js package, you can also access the raw disposable domain list directly at: 📁 data/domains.txt

Installation

# make sure to use @latest since this package updates every week
npm install throwaway-email@latest

Basic Validation

import validEmail from 'throwaway-email';

// Standard validation (TLD + Disposable check)
validEmail("johndoe@gmail.com")    // true
validEmail("johndoe@gmail.con")    // false (invalid TLD)
validEmail("johndoe@dispose.it")   // false (disposable domain)
validEmail("john..doe@gmail.com")  // false (invalid local part per RFC 5322)

Advanced Options

// Disable ICANN TLD validation (still requires ≥2 character TLD)
validEmail("johndoe@gmail.con", false)  // true
validEmail("johndoe@gmail.c", false)    // false (TLD too short)

// Disable disposable domain check
validEmail("johndoe@dispose.it", true, false)    // true
validEmail("john..doe@dispose.it", true, false)  // false (invalid local part)

Parameter Reference

ParameterTypeDefaultDescription
checkTldbooleantrueVerify ICANN-approved TLDs
checkDisposablebooleantrueCheck against disposable domains

Benchmarking

All benchmarks were measured over 10 million runs (averaged), executing each package according to its official documentation. Tests were conducted from an imported state to reflect real-world usage. All runs used the same inputs. You can verify these results by running the benchmarking script: benchmark/index.ts.

PackageAvg. Time (per validation)Validation Logic
throwaway155.73 ns• Local part validation
• Domain validation
• RFC compliance checks
• TLD validation
• ICANN verification
• 70,000+ domain blacklist check
email-validator180.47 ns• Regex pattern matching
• Length verification
@shelf/is-valid-email-address404.70 ns• Local part regex
• Domain regex
• Quoted string check

Key Findings:

  • throwaway demonstrates superior performance (13.7% faster than email-validator, 61.5% faster than @shelf/is-valid-email-address)
  • throwaway provides more comprehensive validation features while maintaining better performance
  • The benchmark reflects real-world usage patterns by testing from imported module state

Reporting Incorrectly Flagged Domains

If you believe a legitimate domain has been mistakenly identified as disposable, you can help improve the validator by contributing to our allow list.

How to contribute:

  • Verify the domain is truly non-disposable (permanent email service)
  • Add the domain to allow_list.txt
  • Submit a pull request with your addition

We welcome community contributions to help maintain the accuracy of our validation system.

License and Ethical Usage

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Full License Text

Open-Source Commitment

This project is released under the GPL-3.0 license, which grants you the freedom to:

  • Use commercially
  • Modify and distribute
  • Apply for patent integration

With the critical requirement that you:

  • Disclose all modifications to the source code.
  • Keep derivative works equally open under GPL-3.0.

Ethical Request

While the license permits commercial use, I strongly believe:
🔓 Data about disposable email domains should remain a public good—free to access, analyze, and redistribute. If you profit from this work:

  • Publicly credit this project (doodad-labs/throwaway-email-checker).
  • Never paywall the core dataset or derived lists.

This ensures transparency and helps protect the internet from abuse.

Contributions

This project is automatically maintained through web scraping and data aggregation, but our sources may become outdated, and some domains might be incorrectly flagged. We need your help to improve accuracy and keep this resource reliable!

🚀 First-Time Contributors Welcome!

We intentionally keep this project beginner-friendly to help newcomers start their open-source journey. No experience needed—just a willingness to learn!

How You Can Help:

🌍 Translations

Help make this project accessible globally by translating documentation or UI elements.

Fix False Flags (allow_list.txt)

If you spot a legitimate domain mistakenly flagged as disposable, submit a correction.

📊 Improve Data Sources

  • Aggregate lists: Contribute new sources of disposable email domains.
  • Scrapers: Help maintain or improve our scrapers for temporary email providers.

🐛 Report Bugs & Suggest Enhancements

Found an issue? Open a ticket or submit a fix!

Getting Started:

Every contribution—big or small—helps keep the internet safer and more transparent!

Keywords

throwaway email

FAQs

Package last updated on 09 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.