Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

email-misspelled

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-misspelled

Check misspell email domain and return a matching domain suggestion

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.3K
increased by36.69%
Maintainers
1
Weekly downloads
 
Created
Source

email-misspelled

CircleCI Status codecov npm npm npm

Check misspell email domain and return a matching domain suggestion

String comparison is based on this

Install

npm i email-misspelled --save
or
yarn add email-misspelled


Importing

import emailMisspelled from "email-misspelled"

const emailChecker = emailMisspelled()

emailChecker("user@otmail.com") // hotmail.com


Options

lengthDiffMax

TypeDefaultDescription
number2max length difference between two string
import emailMisspelled from "email-misspelled"
const emailChecker1 = emailMisspelled({ lengthDiffMax: 1 })

emailChecker1("user@otmail.com") // hotmail.com
emailChecker1("user@tmail.com") // undefined

const emailChecker1 = emailMisspelled({ lengthDiffMax: 2 })

emailChecker1("user@otmail.com") // hotmail.com
emailChecker1("user@tmail.com") // hotmail.com

maxMisspelled

TypeDefaultDescription
number2max possible misspelled
import emailMisspelled from "email-misspelled"
const emailChecker1 = emailMisspelled({ maxMisspelled: 1 })

emailChecker1("user@hotmial.com") // hotmail.com
emailChecker1("user@hotmia.com") // undefined

const emailChecker1 = emailMisspelled({ maxMisspelled: 2 })

emailChecker1("user@hotmial.com") // hotmail.com
emailChecker1("user@hotmia.com") // hotmail.com

domainList

TypeDefaultDescription
string[]Domain listmax possible misspelled
import emailMisspelled from "email-misspelled"
const emailChecker1 = emailMisspelled({ domainList: ["random.org"] })

emailChecker1("user@hotmial.com") // undefined
emailChecker1("user@randmo.org") // random.org

Default domain list

  • outlook.com
  • gmail.com
  • hotmail.com
  • hotmail.fr
  • live.fr
  • live.com
  • laposte.fr
  • wanadoo.fr

TODO

  • Doc
  • TU
  • TS
  • Extend default domain list

Keywords

FAQs

Package last updated on 11 Mar 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc