this repo has no description
0
fork

Configure Feed

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

cleanup, new things

+122 -346
-7
.deepsource.toml
··· 1 - version = 1 2 - 3 - [[analyzers]] 4 - name = "javascript" 5 - 6 - [analyzers.meta] 7 - environment = ["nodejs"]
-14
.github/FUNDING.yml
··· 1 - # These are supported funding model platforms 2 - 3 - github: [IntegerAlex] 4 - patreon: # Replace with a single Patreon username 5 - open_collective: # Replace with a single Open Collective username 6 - ko_fi: # Replace with a single Ko-fi username 7 - tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 - community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 - liberapay: # Replace with a single Liberapay username 10 - issuehunt: # Replace with a single IssueHunt username 11 - otechie: # Replace with a single Otechie username 12 - lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 - polar: # Replace with a single Polar username 14 - custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
-20
.github/ISSUE_TEMPLATE/feature_request.md
··· 1 - --- 2 - name: Feature request 3 - about: Suggest an idea for this project 4 - title: '' 5 - labels: '' 6 - assignees: '' 7 - 8 - --- 9 - 10 - **Is your feature request related to a problem? Please describe.** 11 - A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 - 13 - **Describe the solution you'd like** 14 - A clear and concise description of what you want to happen. 15 - 16 - **Describe alternatives you've considered** 17 - A clear and concise description of any alternative solutions or features you've considered. 18 - 19 - **Additional context** 20 - Add any other context or screenshots about the feature request here.
+31
.github/workflows/npm-publish.yml
··· 1 + name: Publish to npm 2 + 3 + on: 4 + release: 5 + types: [created] 6 + 7 + jobs: 8 + publish: 9 + runs-on: ubuntu-latest 10 + steps: 11 + - uses: actions/checkout@v3 12 + 13 + - name: Setup Node.js 14 + uses: actions/setup-node@v3 15 + with: 16 + node-version: 20 17 + registry-url: https://registry.npmjs.org/ 18 + 19 + - name: Install dependencies 20 + run: npm ci 21 + 22 + - name: Build 23 + run: npm run build 24 + 25 + - name: Test 26 + run: npm test 27 + 28 + - name: Publish to npm 29 + run: npm publish --access public 30 + env: 31 + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
+23 -23
.github/workflows/test.yml
··· 1 1 name: test npm package 2 2 3 3 on: 4 - push: 5 - branches: 6 - - main 4 + push: 5 + branches: 6 + - main 7 7 8 8 jobs: 9 - build: 10 - runs-on: ubuntu-latest 11 - 12 - steps: 13 - - name: Checkout Repository 14 - uses: actions/checkout@v2 15 - 16 - - name: Setup Node.js 17 - uses: actions/setup-node@v4 18 - with: 19 - node-version: 20 20 - 21 - - name: Install Dependencies 22 - run: npm install 9 + build: 10 + runs-on: ubuntu-latest 23 11 24 - - name: Build 25 - run: npm run build 12 + steps: 13 + - name: Checkout Repository 14 + uses: actions/checkout@v2 15 + 16 + - name: Setup Node.js 17 + uses: actions/setup-node@v4 18 + with: 19 + node-version: 20 20 + 21 + - name: Install Dependencies 22 + run: npm install 23 + 24 + - name: Build 25 + run: npm run build 26 26 27 - - name: Run Tests 28 - run: npm install disposable-email-detector 27 + - name: Run Tests 28 + run: npm install @jaspermayone/disposable-email-detector 29 29 30 - - name: test package 31 - run: npm run testpackage 30 + - name: test package 31 + run: npm run testpackage
-128
CODE_OF_CONDUCT.md
··· 1 - # Contributor Covenant Code of Conduct 2 - 3 - ## Our Pledge 4 - 5 - We as members, contributors, and leaders pledge to make participation in our 6 - community a harassment-free experience for everyone, regardless of age, body 7 - size, visible or invisible disability, ethnicity, sex characteristics, gender 8 - identity and expression, level of experience, education, socio-economic status, 9 - nationality, personal appearance, race, religion, or sexual identity 10 - and orientation. 11 - 12 - We pledge to act and interact in ways that contribute to an open, welcoming, 13 - diverse, inclusive, and healthy community. 14 - 15 - ## Our Standards 16 - 17 - Examples of behavior that contributes to a positive environment for our 18 - community include: 19 - 20 - * Demonstrating empathy and kindness toward other people 21 - * Being respectful of differing opinions, viewpoints, and experiences 22 - * Giving and gracefully accepting constructive feedback 23 - * Accepting responsibility and apologizing to those affected by our mistakes, 24 - and learning from the experience 25 - * Focusing on what is best not just for us as individuals, but for the 26 - overall community 27 - 28 - Examples of unacceptable behavior include: 29 - 30 - * The use of sexualized language or imagery, and sexual attention or 31 - advances of any kind 32 - * Trolling, insulting or derogatory comments, and personal or political attacks 33 - * Public or private harassment 34 - * Publishing others' private information, such as a physical or email 35 - address, without their explicit permission 36 - * Other conduct which could reasonably be considered inappropriate in a 37 - professional setting 38 - 39 - ## Enforcement Responsibilities 40 - 41 - Community leaders are responsible for clarifying and enforcing our standards of 42 - acceptable behavior and will take appropriate and fair corrective action in 43 - response to any behavior that they deem inappropriate, threatening, offensive, 44 - or harmful. 45 - 46 - Community leaders have the right and responsibility to remove, edit, or reject 47 - comments, commits, code, wiki edits, issues, and other contributions that are 48 - not aligned to this Code of Conduct, and will communicate reasons for moderation 49 - decisions when appropriate. 50 - 51 - ## Scope 52 - 53 - This Code of Conduct applies within all community spaces, and also applies when 54 - an individual is officially representing the community in public spaces. 55 - Examples of representing our community include using an official e-mail address, 56 - posting via an official social media account, or acting as an appointed 57 - representative at an online or offline event. 58 - 59 - ## Enforcement 60 - 61 - Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 - reported to the community leaders responsible for enforcement at 63 - https://www.linkedin.com/in/akshat-kotpalliwar-554944258/. 64 - All complaints will be reviewed and investigated promptly and fairly. 65 - 66 - All community leaders are obligated to respect the privacy and security of the 67 - reporter of any incident. 68 - 69 - ## Enforcement Guidelines 70 - 71 - Community leaders will follow these Community Impact Guidelines in determining 72 - the consequences for any action they deem in violation of this Code of Conduct: 73 - 74 - ### 1. Correction 75 - 76 - **Community Impact**: Use of inappropriate language or other behavior deemed 77 - unprofessional or unwelcome in the community. 78 - 79 - **Consequence**: A private, written warning from community leaders, providing 80 - clarity around the nature of the violation and an explanation of why the 81 - behavior was inappropriate. A public apology may be requested. 82 - 83 - ### 2. Warning 84 - 85 - **Community Impact**: A violation through a single incident or series 86 - of actions. 87 - 88 - **Consequence**: A warning with consequences for continued behavior. No 89 - interaction with the people involved, including unsolicited interaction with 90 - those enforcing the Code of Conduct, for a specified period of time. This 91 - includes avoiding interactions in community spaces as well as external channels 92 - like social media. Violating these terms may lead to a temporary or 93 - permanent ban. 94 - 95 - ### 3. Temporary Ban 96 - 97 - **Community Impact**: A serious violation of community standards, including 98 - sustained inappropriate behavior. 99 - 100 - **Consequence**: A temporary ban from any sort of interaction or public 101 - communication with the community for a specified period of time. No public or 102 - private interaction with the people involved, including unsolicited interaction 103 - with those enforcing the Code of Conduct, is allowed during this period. 104 - Violating these terms may lead to a permanent ban. 105 - 106 - ### 4. Permanent Ban 107 - 108 - **Community Impact**: Demonstrating a pattern of violation of community 109 - standards, including sustained inappropriate behavior, harassment of an 110 - individual, or aggression toward or disparagement of classes of individuals. 111 - 112 - **Consequence**: A permanent ban from any sort of public interaction within 113 - the community. 114 - 115 - ## Attribution 116 - 117 - This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 - version 2.0, available at 119 - https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 - 121 - Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 - enforcement ladder](https://github.com/mozilla/diversity). 123 - 124 - [homepage]: https://www.contributor-covenant.org 125 - 126 - For answers to common questions about this code of conduct, see the FAQ at 127 - https://www.contributor-covenant.org/faq. Translations are available at 128 - https://www.contributor-covenant.org/translations.
-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. 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.
-44
LEARN.md
··· 1 - # Learning Disposable Email Detector 2 - 3 - Welcome to the Disposable Email Detector project! This guide is designed to help you understand, use, and contribute to the project effectively. 4 - 5 - ## Introduction 6 - 7 - Disposable Email Detector is a Node.js utility designed to identify disposable email addresses and enhance email validation processes. This guide will walk you through essential aspects of using and contributing to the project. 8 - 9 - ## Getting Started 10 - 11 - ### Installation 12 - 13 - To use Disposable Email Detector, you need to install it in your Node.js project. Run the following command: 14 - 15 - ```bash 16 - npm install disposable-email-detector 17 - 18 - import disposableEmailDetector from 'disposable-email-detector'; 19 - 20 - const email = 'test@mailinator.com'; 21 - 22 - disposableEmailDetector(email) 23 - .then((response) => console.log(response)); 24 - ``` 25 - Contributing 26 - We welcome contributions from the community! Whether you want to report a bug, suggest an enhancement, or contribute code, your input is valuable. 27 - 28 - Reporting Issues 29 - If you encounter issues or have suggestions, please open an issue on our GitHub repository. 30 - 31 - Development Setup 32 - To set up the project for development: 33 - 34 - - Clone the repository. 35 - - Install dependencies: npm install 36 - - Make your changes and test. 37 - - Pull Requests 38 - - Submit a pull request with your changes, and we'll review it as soon as possible. 39 - 40 - Security 41 - If you discover security vulnerabilities, please follow our Security Policy to report them responsibly. 42 - 43 - 44 -
+1 -1
LICENSE LICENSE.md
··· 1 1 MIT License 2 2 3 - Copyright (c) 2024 Akshat Kotpalliwar 3 + Copyright (c) 2025 Jasper Mayone (modifed from Akshat Kotpalliwar) 4 4 5 5 Permission is hereby granted, free of charge, to any person obtaining a copy 6 6 of this software and associated documentation files (the "Software"), to deal
+13 -17
README.md
··· 1 - # Disposable Email Detector 1 + # @jaspermayone/disposable-email-detector 2 2 3 - [![DeepScan grade](https://deepscan.io/api/teams/23370/projects/26631/branches/850159/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=23370&pid=26631&bid=850159) 4 - ![workflow](https://github.com/IntegerAlex/disposable-email-detector/actions/workflows/main.yml/badge.svg) 5 - [![DeepSource](https://app.deepsource.com/gh/IntegerAlex/disposable-email-detector.svg/?label=resolved+issues&show_trend=true&token=49_pbJHQLpxvaUFKZ5pbct86)](https://app.deepsource.com/gh/IntegerAlex/disposable-email-detector/) 3 + > [!IMPORTANT] 4 + > This is a fork of [IntegerAlex/disposable-email-detectork](https://github.com/IntegerAlex/disposable-email-detectork), with some improvements and bugfixes. Our base version 1.0.0. was based from Alex's version 3.0.0, specifically commit [da406b2](https://github.com/IntegerAlex/disposable-email-detector/commit/da406b2cbcf0478ab49faabda618be1b588763dc) 6 5 7 - ![NPM Downloads](https://img.shields.io/npm/dt/disposable-email-detector?style=plastic&logo=npm) 8 - ![NPM Version](https://img.shields.io/npm/v/disposable-email-detector) 6 + ![NPM Downloads](https://img.shields.io/npm/dt/@jaspermayone/disposable-email-detector?style=plastic&logo=npm) 7 + ![NPM Version](https://img.shields.io/npm/v/@jaspermayone/disposable-email-detector) 9 8 10 9 ## Overview 11 10 12 - The `disposable-email-detector` is a TypeScript utility designed to identify disposable email addresses, providing developers with a tool to enhance email verification processes. 13 - 14 - ## Demo 15 - 16 - DEMO : [LIVE](https://disposable-email-detector-demo.vercel.app/) 17 - DEMO REPO : [REPO](https://github.com/IntegerAlex/disposable-email-detector-demo) 11 + `@jaspermayone/disposable-email-detector` is a TypeScript utility designed to identify disposable email addresses, providing developers with a tool to enhance email verification processes. 18 12 19 13 ## Features 20 14 ··· 32 26 ### Implementation Details 33 27 34 28 ```javascript 35 - npm i disposable-email-detector 29 + npm i @jaspermayone/disposable-email-detector 36 30 ``` 37 31 38 32 ```javascript 39 - import disposableEmailDetector from 'disposable-email-detector'; 33 + import disposableEmailDetector from "@jaspermayone/disposable-email-detector"; 40 34 41 - const email = 'test@mailinator.com'; 35 + const email = "test@example.com"; 42 36 43 - disposableEmailDetector(email) 44 - .then((response) => console.log(response)); // true 37 + disposableEmailDetector(email).then((response) => console.log(response)); // true 45 38 ``` 46 39 47 40 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. ··· 59 52 ## License 60 53 61 54 This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 55 + 56 + ``` 57 + 62 58 ```
-32
SECURITY.md
··· 1 - # Security Policy 2 - 3 - ## Supported Versions 4 - 5 - Use this section to inform users about which versions of your project are currently being supported with security updates. 6 - 7 - | Version | Supported | 8 - | ------- | ------------------ | 9 - | 1.0.2 | :white_check_mark: | 10 - | 1.0.x | :x: | 11 - 12 - ## Reporting a Vulnerability 13 - 14 - If you discover a security vulnerability within the supported version (1.0.2), please follow these steps: 15 - 16 - 1. **Publicly Disclosed Vulnerabilities:** 17 - - If you discover a security vulnerability that could be exploited by others, please do not disclose it publicly. Instead, report it directly to our security team. 18 - 19 - 2. **Reporting Process:** 20 - - Send an email to security@example.com with a detailed description of the vulnerability. 21 - - Include steps to reproduce the vulnerability, potential impact, and any other relevant information. 22 - 23 - 3. **Response Time:** 24 - - Our security team will acknowledge your report within 48 hours. 25 - 26 - 4. **Security Updates:** 27 - - If the vulnerability is accepted, we will work on releasing a security update promptly. 28 - 29 - 5. **Disclosure Policy:** 30 - - We follow a coordinated disclosure policy, and we appreciate your responsible disclosure of security issues. 31 - 32 - Thank you for helping to keep our project secure!
+2 -2
package-lock.json
··· 1 1 { 2 2 "name": "disposable-email-detector", 3 - "version": "3.0.0", 3 + "version": "1.0.0", 4 4 "lockfileVersion": 2, 5 5 "requires": true, 6 6 "packages": { ··· 102 102 "dev": true 103 103 } 104 104 } 105 - } 105 + }
+7 -8
package.json
··· 1 1 { 2 - "name": "disposable-email-detector", 3 - "version": "3.0.0", 2 + "name": "@jaspermayone/disposable-email-detector", 3 + "version": "3.1.0", 4 4 "description": "disposable email detector", 5 5 "main": "index.js", 6 6 "scripts": { ··· 17 17 "disposable-email-detector", 18 18 "disposable-email" 19 19 ], 20 - "author": "Akshat Kotpalliwar ( alias IntegerAlex on GitHub )", 20 + "author": "Jasper Mayone <me@jaspermayone.com>", 21 21 "repository": { 22 22 "type": "git", 23 - "url": "https://www.github.com/IntegerAlex/disposable-email-detector" 23 + "url": "git+https://github.com/jaspermayone-forks/disposable-email-detector.git" 24 24 }, 25 25 "license": "MIT", 26 26 "devDependencies": { 27 27 "@types/node": "^20.11.25", 28 28 "typescript": "^5.4.2" 29 29 }, 30 - "dependencies": { 31 - "disposable-email-detector": "^3.0.0" 32 - } 33 - } 30 + "dependencies": {}, 31 + "private": false 32 + }
+3 -3
test/package.ts
··· 1 - import disposableEmailDetector from 'disposable-email-detector' 1 + import disposableEmailDetector from "@jaspermayone/disposable-email-detector"; 2 2 3 3 // Test the disposableEmailDetector function 4 4 (async () => { 5 - console.log(await disposableEmailDetector('user69@spamavert.com')); // false 6 - })(); 5 + console.log(await disposableEmailDetector("user69@spamavert.com")); // false 6 + })();
+42 -40
test/usage.ts
··· 1 1 import fs from "fs/promises"; 2 - import disposableEmailDetector from "../index"; 3 2 import path from "path"; 3 + import disposableEmailDetector from "../index"; 4 4 5 5 // Load test emails from file 6 6 const filePath: string = path.join(__dirname, "./testEmails.txt"); 7 7 8 8 async function loadTestEmails(filePath: string): Promise<string[]> { 9 - const rawData = await fs.readFile(filePath); 10 - return rawData.toString().trim().split("\n"); 9 + const rawData = await fs.readFile(filePath); 10 + return rawData.toString().trim().split("\n"); 11 11 } 12 12 13 13 async function runTests() { 14 - try { 15 - const testEmails = await loadTestEmails(filePath); 14 + try { 15 + const testEmails = await loadTestEmails(filePath); 16 16 17 - for (const email of testEmails) { 18 - const isDisposable = await disposableEmailDetector(email); 19 - console.log(email, "- Disposable:", isDisposable); 20 - } 21 - console.log("Test passed."); 22 - } catch (error: any) { 23 - console.error("Unexpected error:", error); 24 - console.error("Please check the file path and try again."); 25 - console.error("Test failed."); 17 + for (const email of testEmails) { 18 + const isDisposable = await disposableEmailDetector(email); 19 + console.log(email, "- Disposable:", isDisposable); 26 20 } 21 + console.log("Test passed."); 22 + } catch (error: any) { 23 + console.error("Unexpected error:", error); 24 + console.error("Please check the file path and try again."); 25 + console.error("Test failed."); 26 + } 27 27 } 28 28 29 29 async function runTestsExternalGithub() { 30 - try { 31 - const testEmails = await loadTestEmails(filePath); 30 + try { 31 + const testEmails = await loadTestEmails(filePath); 32 32 33 - for (const email of testEmails) { 34 - const isDisposable = await disposableEmailDetector(email, { 35 - loadFromSource: { github: true }, 36 - }); 37 - console.log(email, "- Disposable:", isDisposable); 38 - } 39 - console.log("External: Github Test passed."); 40 - } catch (error: any) { 41 - console.error("Unexpected error:", error); 42 - console.error("Please check the github repository for index.json and try again."); 43 - console.error("Test failed."); 33 + for (const email of testEmails) { 34 + const isDisposable = await disposableEmailDetector(email, { 35 + loadFromSource: { github: true }, 36 + }); 37 + console.log(email, "- Disposable:", isDisposable); 44 38 } 39 + console.log("External: Github Test passed."); 40 + } catch (error: any) { 41 + console.error("Unexpected error:", error); 42 + console.error( 43 + "Please check the github repository for index.json and try again." 44 + ); 45 + console.error("Test failed."); 46 + } 45 47 } 46 48 47 49 async function runTestsExternalURL() { 48 - try { 49 - const testEmails = await loadTestEmails(filePath); 50 + try { 51 + const testEmails = await loadTestEmails(filePath); 50 52 51 - for (const email of testEmails) { 52 - const isDisposable = await disposableEmailDetector(email, { 53 - loadFromSource: { url: "https://pastebin.com/raw/HL70DeZg" }, 54 - }); 55 - console.log(email, "- Disposable:", isDisposable); 56 - } 57 - console.log("External: URL Test passed."); 58 - } catch (error: any) { 59 - console.error("Unexpected error:", error); 60 - console.error("Please check the URL and try again."); 61 - console.error("Test failed."); 53 + for (const email of testEmails) { 54 + const isDisposable = await disposableEmailDetector(email, { 55 + loadFromSource: { url: "https://pastebin.com/raw/HL70DeZg" }, 56 + }); 57 + console.log(email, "- Disposable:", isDisposable); 62 58 } 59 + console.log("External: URL Test passed."); 60 + } catch (error: any) { 61 + console.error("Unexpected error:", error); 62 + console.error("Please check the URL and try again."); 63 + console.error("Test failed."); 64 + } 63 65 } 64 66 65 67 runTests();