
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
email-misspelled
Advanced tools
Check misspell email's domain and return a list of matching domain suggestions
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

Install with npm:
npm i email-misspelled
Install with yarn:
yarn add email-misspelled
import 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 :
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"
* }]
**/
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.auFAQs
Check misspell email's domain and return a list of matching domain suggestions
The npm package email-misspelled receives a total of 12,680 weekly downloads. As such, email-misspelled popularity was classified as popular.
We found that email-misspelled demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.

Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.