Correct common misspellings in an email address, based on Kicksend's Mailcheck library.
$ component install ianstormtaylor/correct-email
var correct = require('correct-email');
var correction = correct('test@gmai.com');
{
local : 'test',
domain : 'gmail.com',
email : 'test@gmail.com'
}
Returns a correction for the given email string
, or false
if nothing to correct.
Change the string distance threshold for matches.
The array of domain names to match against.
The array of TLDs to match against.
MIT