this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

README updated

akshat 5e22404d 0a40e18c

+41
+41
README.md
··· 1 + # Disposable Email Detector 2 + 3 + [![CodeScene Code Health](https://codescene.io/projects/50926/status-badges/code-health)](https://codescene.io/projects/50926) 4 + ![workflow](https://github.com/IntegerAlex/disposable-email-detector/actions/workflows/main.yml/badge.svg) 5 + [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8456/badge)](https://www.bestpractices.dev/projects/8456) 6 + ![NPM Version](https://img.shields.io/npm/v/disposable-email-detector) 7 + 8 + ## Overview 9 + 10 + The `disposable-email-detector` is a TypeScript utility designed to identify disposable email addresses, providing developers with a tool to enhance email verification processes. 11 + 12 + ## Features 13 + 14 + - **Domain Check:** Identifies if an email address belongs to a known disposable email domain. 15 + - **Error Handling:** Offers informative messages for scenarios like missing `index.json` or invalid JSON format. 16 + - **Async File Reading:** Utilizes asynchronous file reading for improved performance. 17 + 18 + ## Getting Started 19 + 20 + ### Prerequisites 21 + 22 + - Node.js 23 + - npm 24 + 25 + ### Installation 26 + 27 + 1. Clone the repository. 28 + 2. Install dependencies: 29 + 30 + ```bash 31 + npm install 32 + 33 + ### Implementation Details 34 + 35 + 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. 36 + 37 + ### Error Handling 38 + 39 + If index.json is not found, the script informs you to create it with disposable domains. 40 + If index.json has an invalid JSON format, it prompts you to correct the file. 41 + Unexpected errors are logged to the console.