Email Spell Checker is a lightweight JavaScript module written in TypeScript that suggests a right domain when your users misspell it in an email address.
At ZooTools - web3 mailchimp alternative, we validate thousands of emails daily with email-spell-checker and it helped us to reducing bounced emails by 30%.
The features your deserve
We rewrote and improved mailcheck.js, a great module that is not longer maintained (7+ years since last update) and that contains a bug.
⚡️ Lighting fast: Highly performance email checking using Sift3 - a fast and accurate string distance algorithm.
🚀 Ridiculously small: 2KB (minzip) and 0 external dependencies. We agree, big bundles suck!
🔋 Updated: 39+ popular domains, and 66+ modern TLDs out-of-the-box. Frequent updates.
💙 TypeScript: Fully written in TypeScript, cause we know you love it and we too.
⚙️ Extensible: Allows to pass your custom rules and domains. Tweak it as you need.
🔨 1 minute migration: Same API and functions as mailcheck so you can switch in a sec!
🔐 Unit tested: Cause we'd not ever used a library without tests :).
Some good use cases
User authentication (login, signup, email recovery).
Backend email validation.
Newsletter subscriptions.
Getting Started in 5 minutes
Adding Email Spell Checker to your project takes you less than 5 minutes.
It works on any JavaScript framework (Vue, React, Next.JS, Angular, Svelte, etc) as well as the your backend server.
Here some highly-requested tutorials. If you want to write a tutorial send a PR or create an issue if you want to ask for one:
Call run function with the email you want to validate.
Get the suggested email, and prompt your user to accept suggestion.
import emailSpellChecker from'@zootools/email-spell-checker';
const suggestedEmail = emailSpellChecker.run({
email: 'jorge@gmaik.co',
});
if (suggestedEmail) {
// DEV: Handle the suggestion.// E.g: tell the user their email is wrong and offer to apply your suggestionconsole.log(suggestedEmail);
// {// address: "jorge"// domain: "gmail.com"// suggestedEmail: "jorge@gmail.com"// }
}
Extending Domains
EmailSpellChecker has inbuilt defaults if the domains, secondLevelDomains or topLevelDomains options aren't provided.
The out-of-the-box configuration is the best for 99% of cases. If you are that 1%, here is how you can extend the configuration :).
Adding your own Domains
You can replace EmailSpellChecker's default domain/TLD suggestions by supplying replacements to EmailSpellChecker.run:
mailSpellChecker.js (mail spell checker) is a lightweight module that suggests a right domain when your users misspell it in an email address
The npm package @zootools/email-spell-checker receives a total of 27,820 weekly downloads. As such, @zootools/email-spell-checker popularity was classified as popular.
We found that @zootools/email-spell-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 21 Oct 2022
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.
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
By Kirill Boychenko, Peter van der Zee - Jan 29, 2025