# Disposable Email Validator: Block Disposable Emails and Plus Addressing

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator
Generated for open source discovery and AI-assisted research.

The `disposable-email-validator` library helps prevent fake signups by blocking disposable email addresses and optional plus addressing. It offers flexible, environment-specific rules, making it ideal for production applications while allowing development flexibility. This TypeScript-based tool provides a robust solution for email validation.

GitHub: https://github.com/oluwatunmiisheii/disposable-email-validator
OSRepos URL: https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator

## Summary

The `disposable-email-validator` library helps prevent fake signups by blocking disposable email addresses and optional plus addressing. It offers flexible, environment-specific rules, making it ideal for production applications while allowing development flexibility. This TypeScript-based tool provides a robust solution for email validation.

## Topics

- TypeScript
- Email Validation
- Security
- Node.js
- Spam Prevention
- Development Tools
- Email Blocking

## Repository Information

Last analyzed by OSRepos: Fri Feb 06 2026 00:00:18 GMT+0000 (Western European Standard Time)
Detail views: 7
GitHub clicks: 13

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

`disposable-email-validator` is a powerful TypeScript library designed to help applications block disposable email addresses and manage plus addressing with environment-specific rules. It's perfect for preventing fake signups in production environments while offering flexibility for development and testing. The library provides a robust, configurable solution to enhance the integrity of user registrations and communications.

## Installation

Getting started with `disposable-email-validator` is straightforward. You can install it using npm:

bash
npm install disposable-email-validator


## Examples

Here's a quick example demonstrating how to configure and use the validator to block disposable emails in a production environment:

ts
import { DisposableEmailValidator } from 'disposable-email-validator';

const config = {
  production: {
    rules: {
      allow_disposable_emails: false,
      allow_plus_addressing: false,
    }
  }
};

const validator = new DisposableEmailValidator('production', config);

const result = validator.validateEmail('user@10minutemail.com');
console.log(result);
// { success: false, error: 'Disposable email addresses are not allowed' }


The library supports highly flexible, environment-based configuration, allowing you to define different validation rules for `development`, `staging`, `production`, or any custom environment you create. You can also provide custom lists of disposable or trusted domains and control whether they merge with the built-in list.

## Why Use This?

`disposable-email-validator` offers several compelling benefits for your applications:

*   **Designed for production apps**: Built with real-world scenarios in mind.
*   **Prevent fake signups**: Effectively blocks temporary emails that often lead to spam or fraudulent accounts.
*   **Multiple environments supported**: Easily adapt validation rules across different deployment stages.
*   **Built-in domain blacklist**: Comes with a comprehensive list of known throwaway providers out of the box.
*   **Fast, typesafe, and extendable**: Offers high performance, full TypeScript support, and easy customization.

## Links

*   **GitHub Repository**: [https://github.com/wilsonadenuga/disposable-email-validator](https://github.com/wilsonadenuga/disposable-email-validator){:target="_blank"}
*   **npm Package**: [https://www.npmjs.com/package/disposable-email-validator](https://www.npmjs.com/package/disposable-email-validator){:target="_blank"}