Giter Site home page Giter Site logo

integeralex / disposable-email-detector Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 2.0 727 KB

This repository contains a Node.js utility for detecting disposable email addresses. It helps identify whether an email address belongs to a disposable email provider, aiding in the prevention of spam and unwanted sign-ups.

License: MIT License

JavaScript 51.53% TypeScript 48.47%
email emailvalidator validation blackfire codescene deepscan deepsource github github-copilot learn

disposable-email-detector's Introduction

Disposable Email Detector

CodeScene Code Health 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 = '[email protected]';

    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.

disposable-email-detector's People

Contributors

integeralex avatar deepsource-autofix[bot] avatar deepsource-io[bot] avatar

Stargazers

Ryan Lee avatar VirtualHorror avatar  avatar Al-Khawarizmi avatar  avatar BAGUS BUDI SATOTO avatar  avatar Nisal Gunawardhana avatar PurnaPattela avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.