this repo has no description
0
fork

Configure Feed

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

added CONTRIBUTING.md

akshat 02f77dc2 d061ccc7

+11 -3
+7
CONTRIBUTING.md
··· 1 + # Contributing to Disposable Email Detector 2 + 3 + We welcome and appreciate your contributions! Here's how you can get involved: 4 + 5 + * **Updating Disposable Domains:** Help keep the `index.json` up-to-date. See [community resources for finding disposable domains]([https://github.com/ivolo/disposable-email-domains](https://github.com/ivolo/disposable-email-domains)) 6 + * **Reporting Issues:** If you find a bug, please open an issue with a clear description. 7 + * **Code Improvements:** Feel free to suggest code enhancements or refactorings by submitting a pull request.
+3 -2
index.js
··· 14 14 Object.defineProperty(exports, "__esModule", { value: true }); 15 15 const promises_1 = __importDefault(require("fs/promises")); 16 16 const path_1 = __importDefault(require("path")); 17 + // Function to detect disposable email addresses 17 18 function disposableEmailDetector(email) { 18 19 return __awaiter(this, void 0, void 0, function* () { 19 20 try { ··· 21 22 const disposableDomainsBuffer = yield promises_1.default.readFile(path_1.default.join(__dirname, 'index.json')); 22 23 const disposableDomains = JSON.parse(disposableDomainsBuffer.toString()); 23 24 // Extract the domain from the email address 24 - const domain = email.split('@')[1].toLowerCase(); 25 - // Check if the domain is in the list of disposable domains 25 + const domain = email.split('@')[1].toLowerCase(); // Get the domain part of the email address and convert it to lowercase 26 + // Check if the domain is in the list of disposable domains 26 27 return disposableDomains.includes(domain); 27 28 } 28 29 catch (error) {
+1 -1
package.json
··· 1 1 { 2 2 "name": "disposable-email-detector", 3 - "version": "1.0.0", 3 + "version": "1.0.1", 4 4 "description": "disposable email detector", 5 5 "main": "index.js", 6 6 "scripts": {