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

domain-correction

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domain-correction

Provide suggested corrections to misspelt email domain names

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

domain-correction

Provide suggested corrections to misspelt email domain names

Installation

npm install domain-correction

Usage

const domainCorrection = require('domain-correction');

// pass options to get a function to use
const correct = domainCorrection(/* additionalHosts = [], includeDefaults = true, maxEditDistance = 3 */);

// pass in user input to get suggested changes
correct('gmai.com');       // 'gmail.com'
correct('hotamil.fr');     // 'hotmail.fr'
correct('foobarmail.com'); // 'foobarmail.com'
correct('OuTlOoK.com');    // 'outlook.com'
correct('aol.com');        // 'aol.com'

Development

  • make compile to compile source code from ES6 to ES5
  • make test to run tests
  • make lint to lint files
  • make watch to automatically watch source directory for changes
  • make coverage to run the tests with a coverage report
  • make view-coverage to open the detailed report in your browser
Deployment
  1. Create a release.
  • Run make compile
  • Update package.json to increment the version number.
  • Update History.md
  • Commit this change.
  1. Create a tag.
  • git tag -a v1.2.3
  1. Push changes
  • git push --follow-tags origin master
  1. Publish to npm
  • npm publish

FAQs

Package last updated on 27 Oct 2015

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