https://github.com/bredele/email-suggest
Suggest email address based on list of popular email domains
https://github.com/bredele/email-suggest
autocomplete email suggestion
Last synced: 11 months ago
JSON representation
Suggest email address based on list of popular email domains
- Host: GitHub
- URL: https://github.com/bredele/email-suggest
- Owner: bredele
- License: mit
- Created: 2018-12-13T17:59:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-21T14:16:51.000Z (about 1 year ago)
- Last Synced: 2025-07-07T12:09:54.137Z (about 1 year ago)
- Topics: autocomplete, email, suggestion
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# email-suggest
[](https://www.npmjs.com/package/email-suggest)
[](http://npm-stat.com/charts.html?package=email-suggest)
Suggest email address based on the [most popular email domain](https://github.com/bredele/email-domain-popular)
## Installation
```shell
npm install email-suggest
```
## Usage
```js
import suggest from "email-suggest";
suggest("hello@gm");
// => hello@gmail.com
suggest("world@go");
// => world@google.com
suggest("hello@ao");
// => hello@aol.com
// get list of all suggest domains
suggest("hello@ao", (address, domains) => {
console.log(domains);
// => ['aol.com', 'aol.it']
});
// no suggestion
suggest("hello@zzp");
// undefined
// custom list of suggestions
suggest("hello@w", undefined, ["world.com", "olivier.com"]);
// => hello@world.com
// custom list of suggestions
suggest("hello@g", undefined, ["world.com", "olivier.com"], true);
// => hello@gmail.com
suggest("hello@console.warn();", undefined, ["world.com", "olivier.com"], true);
// => hello@world.com
```