https://github.com/IkechukwuAKalu/temp-mail-detector
A Node.js module to detect temporary email addresses
https://github.com/IkechukwuAKalu/temp-mail-detector
detector nodejs nodejs-modules temp-mail
Last synced: 6 months ago
JSON representation
A Node.js module to detect temporary email addresses
- Host: GitHub
- URL: https://github.com/IkechukwuAKalu/temp-mail-detector
- Owner: IkechukwuAKalu
- Created: 2019-10-17T11:12:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-20T16:21:58.000Z (over 2 years ago)
- Last Synced: 2025-03-10T19:53:58.292Z (7 months ago)
- Topics: detector, nodejs, nodejs-modules, temp-mail
- Language: TypeScript
- Homepage:
- Size: 482 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Temp Mail Detector
[](https://travis-ci.org/IkechukwuAKalu/temp-mail-detector)
[](https://badge.fury.io/js/temp-mail-detector)This is a Node.js module to detect temporary email addresses. It helps developers prevent bots from creating multiple user accounts utilzing those addresses.
This software is still being developed and updates will be published on this document. In the meantime, ideas and suggestions for improvements and fixes are welcome.
## Installation
To install this package, run `npm install --save temp-mail-detector` or `npm i -S temp-mail-detector`## Example Usage
The code below shows how to use this package to detect temporary email addresses
```js
const detector = require("temp-mail-detector");(async function() {
const email = "lixawelat@imaild.com";
const result = await detector.isTempMail(email);
console.log(result); // returns true or false
})();
```## Run from Source
To run this project, you need the following software installed; `git`, `node` and `npm`. NPM usually comes bundled together in the Node.Js installer. After you have installed them, follow the steps below to run this project.- Clone the project `git clone https://github.com/IkechukwuAKalu/temp-mail-detector.git`
- Navigate to the project root directory in your terminal
- Install dependencies `npm i`
- Build the project `npm run build`
- Run the project `npm start`**NOTE:** The command, `npm run build`, enables Typescript watch on `.ts` files. To run the project, you have to open a new terminal session still at the project root directory.
## Run Tests
Tests have been included in this project to ensure everything works as expected.
- To run tests for this project, `npm test` or `npm run test-watch` to watch files for modifications
- To generate a test coverage report, `npm run coverage`====