email-misspelled v4.3.1
Lightweight < 3ko lib
Check the misspelled email's domain and return a list of matching domain suggestions sorted by corrections needed
The string comparison is based on this algorithm
live codepen demo

Table of Contents
Install with npm:
npm i email-misspelledInstall with yarn:
yarn add email-misspelledimport emailMisspelled, { top100 } from "email-misspelled"
const emailChecker = emailMisspelled({ domains: top100 })
emailChecker("user@otmail.com")
/**
* [{
* suggest: "hotmail.com",
* misspelledCount: 1,
* corrected:"user@hotmail.com",
* original: "user@otmail.com"
* }]
**/domains
| Type | Required | Description |
|---|---|---|
string[] DomainList | true | list of domains to compare |
import emailMisspelled from "email-misspelled"
const emailChecker = emailMisspelled({ domains: ["random.org"] })
emailChecker("user@hotmial.com") // []
emailChecker("user@randmo.org")
/**
* return :
* [
* {
* suggest: "random.org",
* misspelledCount: 1,
* corrected:"user@random.org",
* original: "user@randmo.org"
* }
* ]
**/List of domains avaibles :
- Top 100 domains list
- Hotmail
- Live
- Outlook
- Microsoft (a combination of hotmail, live and outlook emails)
- Yahoo
- Aol
- Others domains
- All (all previous domains in one list)
examples
import { top100, hotmail, live } from "email-misspelled" Feel free to contribute
maxMisspelled
| Type | Required | Default | Description |
|---|---|---|---|
number | false | 2 | max possible misspelled |
import emailMisspelled, { top100 } from "email-misspelled"
const emailChecker1 = emailMisspelled({ maxMisspelled: 1, domains: top100 })
emailChecker1("user@hotmial.com")
/**
* return :
* [{
* suggest: "hotmail.com",
* misspelledCount: 1,
* corrected:"user@hotmail.com",
* original: "user@hotmial.com"
* }]
**/
emailChecker1("user@hotmia.com") // []
const emailChecker2 = emailMisspelled({ maxMisspelled: 3, domains: top100 })
emailChecker2("user@hotmial.com")
/**
* return :
* [{
* suggest: "hotmail.com",
* misspelledCount: 2,
* corrected:"user@hotmail.com",
* original: "user@hotmial.com"
* }]
**/
emailChecker2("user@hotmia.com")
/**
* return :
* [{
* suggest: "hotmail.com",
* misspelledCount: 3,
* corrected:"user@hotmail.com",
* original: "user@hotmia.com"
* }]
**/
emailChecker2("user@otmia.com") //4 misspelled, return []lengthDiffMax
| Type | Required | Default | Description |
|---|---|---|---|
number | false | 3 | max length difference between two string |
import emailMisspelled, { top100 } from "email-misspelled"
const emailChecker1 = emailMisspelled({ lengthDiffMax: 1, domains: top100 })
emailChecker1("user@otmail.com")
/**
* return :
* [{
* suggest: "hotmail.com",
* misspelledCount: 1,
* corrected:"user@hotmail.com",
* original: "user@otmail.com"
* }]
**/
emailChecker1("user@tmail.com") // []
const emailChecker2 = emailMisspelled({ lengthDiffMax: 2, domains: top100 })
emailChecker2("user@otmail.com")
/**
* return :
* [{
* suggest: "hotmail.com",
* misspelledCount: 1,
* corrected:"user@hotmail.com",
* original: "user@otmail.com"
* }]
**/
emailChecker2("user@tmail.com")
/**
* return :
* [{
* suggest: "gmail.com",
* misspelledCount: 1,
* corrected:"user@gmail.com",
* original: "user@tmail.com"
* },
* {
* suggest: "hotmail.com",
* misspelledCount: 2,
* corrected:"user@hotmail.com",
* original: "user@tmail.com"
* }]
**/Top 100 domains list
ordered by number of existing email
gmail.comyahoo.comhotmail.comaol.comhotmail.co.ukhotmail.frmsn.comyahoo.frwanadoo.frorange.frcomcast.netyahoo.co.ukyahoo.com.bryahoo.co.inlive.comrediffmail.comfree.frgmx.deweb.deyandex.ruymail.comlibero.itoutlook.comuol.com.brbol.com.brmail.rucox.nethotmail.itsbcglobal.netsfr.frlive.frverizon.netlive.co.ukgooglemail.comyahoo.esig.com.brlive.nlbigpond.comterra.com.bryahoo.itneuf.fryahoo.dealice.itrocketmail.comatt.netlaposte.netfacebook.combellsouth.netyahoo.inhotmail.escharter.netyahoo.cayahoo.com.aurambler.ruhotmail.detiscali.itshaw.cayahoo.co.jpsky.comearthlink.netoptonline.netfreenet.det-online.dealiceadsl.frvirgilio.ithome.nlqq.comtelenet.beme.comyahoo.com.artiscali.co.ukyahoo.com.mxvoila.frgmx.netmail.complanet.nltin.itlive.itntlworld.comarcor.deyahoo.co.idfrontiernet.nethetnet.nllive.com.auyahoo.com.sgzonnet.nlclub-internet.frjuno.comoptusnet.com.aublueyonder.co.ukbluewin.chskynet.besympatico.cawindstream.netmac.comcenturytel.netchello.nllive.caaim.combigpond.net.au
12 months ago
12 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago