🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

disposable-email-detector

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disposable-email-detector

disposable email detector

3.0.0
latest
Source
npm
Version published
Weekly downloads
2.7K
34.62%
Maintainers
0
Weekly downloads
 
Created
Source

Disposable Email Detector

DeepScan grade workflow OpenSSF Best Practices DeepSource

NPM Downloads NPM Version

Overview

The disposable-email-detector is a TypeScript utility designed to identify disposable email addresses, providing developers with a tool to enhance email verification processes.

Features

  • Domain Check: Identifies if an email address belongs to a known disposable email domain.
  • Error Handling: Offers informative messages for scenarios like missing index.json or invalid JSON format.
  • Async File Reading: Utilizes asynchronous file reading for improved performance.

Getting Started

Prerequisites

  • Node.js
  • npm

Implementation Details

    npm i disposable-email-detector
    import  disposableEmailDetector  from 'disposable-email-detector';

    const email = 'test@mailinator.com';

    disposableEmailDetector(email)
        .then((response) => console.log(response)); //  true 

The disposableEmailDetector function reads a list of disposable email domains from index.json. It checks whether the provided email address belongs to a disposable domain and returns a boolean indicating the result.

Error Handling

  • If index.json is not found, the script informs you to create it with disposable domains.
  • If index.json has an invalid JSON format, it prompts you to correct the file.
  • Unexpected errors are logged to the console.

Contributing

Contributions are welcome! Please refer to the contributing guidelines for more information.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

disposable

FAQs

Package last updated on 22 Feb 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