email-suggest
v1.2.1
Published
Suggest email address based on list of popular email domains
Downloads
99
Readme
email-suggest
Suggest email address based on the most popular email domain
Installation
npm install email-suggestUsage
import suggest from "email-suggest";
suggest("hello@gm");
// => [email protected]
suggest("world@go");
// => [email protected]
suggest("hello@ao");
// => [email protected]
// 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"]);
// => [email protected]
// custom list of suggestions
suggest("hello@g", undefined, ["world.com", "olivier.com"], true);
// => [email protected]
suggest("[email protected]();", undefined, ["world.com", "olivier.com"], true);
// => [email protected]