{"name":"Disposable Email Validator: Block Disposable Emails and Plus Addressing","description":"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","url":"https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator.md","json":"https://osrepos.com/repo/oluwatunmiisheii-disposable-email-validator.json","topics":["TypeScript","Email Validation","Security","Node.js","Spam Prevention","Development Tools","Email Blocking"],"keywords":["TypeScript","Email Validation","Security","Node.js","Spam Prevention","Development Tools","Email Blocking"],"stars":null,"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.","content":"## Introduction\n\n`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.\n\n## Installation\n\nGetting started with `disposable-email-validator` is straightforward. You can install it using npm:\n\nbash\nnpm install disposable-email-validator\n\n\n## Examples\n\nHere's a quick example demonstrating how to configure and use the validator to block disposable emails in a production environment:\n\nts\nimport { DisposableEmailValidator } from 'disposable-email-validator';\n\nconst config = {\n  production: {\n    rules: {\n      allow_disposable_emails: false,\n      allow_plus_addressing: false,\n    }\n  }\n};\n\nconst validator = new DisposableEmailValidator('production', config);\n\nconst result = validator.validateEmail('user@10minutemail.com');\nconsole.log(result);\n// { success: false, error: 'Disposable email addresses are not allowed' }\n\n\nThe 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.\n\n## Why Use This?\n\n`disposable-email-validator` offers several compelling benefits for your applications:\n\n*   **Designed for production apps**: Built with real-world scenarios in mind.\n*   **Prevent fake signups**: Effectively blocks temporary emails that often lead to spam or fraudulent accounts.\n*   **Multiple environments supported**: Easily adapt validation rules across different deployment stages.\n*   **Built-in domain blacklist**: Comes with a comprehensive list of known throwaway providers out of the box.\n*   **Fast, typesafe, and extendable**: Offers high performance, full TypeScript support, and easy customization.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/wilsonadenuga/disposable-email-validator](https://github.com/wilsonadenuga/disposable-email-validator){:target=\"_blank\"}\n*   **npm Package**: [https://www.npmjs.com/package/disposable-email-validator](https://www.npmjs.com/package/disposable-email-validator){:target=\"_blank\"}","metrics":{"detailViews":7,"githubClicks":13},"dates":{"published":null,"modified":"2026-02-06T00:00:18.000Z"}}