npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

email-misspelled

v4.3.0

Published

Check misspell email's domain and return a list of matching domain suggestions

Downloads

35,173

Readme

npm CircleCI Status codecov npm npm npm

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

example

Table of Contents

  1. Install
  2. Usages
  3. Options

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("[email protected]")
/**
 * [{ 
 *      suggest: "hotmail.com", 
 *      misspelledCount: 1, 
 *      corrected:"[email protected]", 
 *      original: "[email protected]"
 * }]
 **/

domains

| Type | Required | Description | | :--- | :------- | :---------- | | string[] DomainList | true | list of domains to compare |

import emailMisspelled from "email-misspelled"
const emailChecker = emailMisspelled({ domains: ["random.org"] })

emailChecker("[email protected]") // []
emailChecker("[email protected]")
/**
 * return :
 * [
 *   { 
 *      suggest: "random.org", 
 *      misspelledCount: 1, 
 *      corrected:"[email protected]", 
 *      original: "[email protected]"
 *   }
 * ]
 **/

List of domains avaibles :

More details here

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("[email protected]")
/**
 * return :
 * [{ 
 *      suggest: "hotmail.com",  
 *      misspelledCount: 1,  
 *      corrected:"[email protected]",  
 *      original: "[email protected]"
 * }]
 **/
emailChecker1("[email protected]") // []

const emailChecker2 = emailMisspelled({ maxMisspelled: 3, domains: top100 })

emailChecker2("[email protected]")
/**
 * return :
 * [{  
 *      suggest: "hotmail.com",  
 *      misspelledCount: 2,  
 *      corrected:"[email protected]",  
 *      original: "[email protected]"  
 * }]
 **/
emailChecker2("[email protected]")
/**
 * return :
 * [{  
 *      suggest: "hotmail.com",  
 *      misspelledCount: 3,  
 *      corrected:"[email protected]",  
 *      original: "[email protected]"  
 * }]
 **/
emailChecker2("[email protected]") //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("[email protected]")
/**
 * return :
 * [{  
 *      suggest: "hotmail.com",
 *      misspelledCount: 1,
 *      corrected:"[email protected]",
 *      original: "[email protected]"
 * }]
 **/
emailChecker1("[email protected]") // []

const emailChecker2 = emailMisspelled({ lengthDiffMax: 2, domains: top100 })

emailChecker2("[email protected]")
/**
 * return :
 * [{ 
 *      suggest: "hotmail.com",
 *      misspelledCount: 1,
 *      corrected:"[email protected]",
 *      original: "[email protected]"
 * }]
 **/
emailChecker2("[email protected]")
/**
 * return :
 * [{
 *      suggest: "gmail.com",
 *      misspelledCount: 1,
 *      corrected:"[email protected]",
 *      original: "[email protected]"
 * },
 * {
 *      suggest: "hotmail.com",
 *      misspelledCount: 2,
 *      corrected:"[email protected]",
 *      original: "[email protected]"
 * }]
 **/

Top 100 domains list

ordered by number of existing email

  • gmail.com
  • yahoo.com
  • hotmail.com
  • aol.com
  • hotmail.co.uk
  • hotmail.fr
  • msn.com
  • yahoo.fr
  • wanadoo.fr
  • orange.fr
  • comcast.net
  • yahoo.co.uk
  • yahoo.com.br
  • yahoo.co.in
  • live.com
  • rediffmail.com
  • free.fr
  • gmx.de
  • web.de
  • yandex.ru
  • ymail.com
  • libero.it
  • outlook.com
  • uol.com.br
  • bol.com.br
  • mail.ru
  • cox.net
  • hotmail.it
  • sbcglobal.net
  • sfr.fr
  • live.fr
  • verizon.net
  • live.co.uk
  • googlemail.com
  • yahoo.es
  • ig.com.br
  • live.nl
  • bigpond.com
  • terra.com.br
  • yahoo.it
  • neuf.fr
  • yahoo.de
  • alice.it
  • rocketmail.com
  • att.net
  • laposte.net
  • facebook.com
  • bellsouth.net
  • yahoo.in
  • hotmail.es
  • charter.net
  • yahoo.ca
  • yahoo.com.au
  • rambler.ru
  • hotmail.de
  • tiscali.it
  • shaw.ca
  • yahoo.co.jp
  • sky.com
  • earthlink.net
  • optonline.net
  • freenet.de
  • t-online.de
  • aliceadsl.fr
  • virgilio.it
  • home.nl
  • qq.com
  • telenet.be
  • me.com
  • yahoo.com.ar
  • tiscali.co.uk
  • yahoo.com.mx
  • voila.fr
  • gmx.net
  • mail.com
  • planet.nl
  • tin.it
  • live.it
  • ntlworld.com
  • arcor.de
  • yahoo.co.id
  • frontiernet.net
  • hetnet.nl
  • live.com.au
  • yahoo.com.sg
  • zonnet.nl
  • club-internet.fr
  • juno.com
  • optusnet.com.au
  • blueyonder.co.uk
  • bluewin.ch
  • skynet.be
  • sympatico.ca
  • windstream.net
  • mac.com
  • centurytel.net
  • chello.nl
  • live.ca
  • aim.com
  • bigpond.net.au