email-syntax-check
v1.1.3
Published
A simple matcher with regex cache.
Downloads
1,112
Maintainers
Readme
email-syntax-check
E-Mail address syntax validation module.
Installation
npm install email-syntax-check
Status
none,official,disposable,free-email,spam-trap,role-based
Usage
const esc = require('email-syntax-check');
esc.syntaxCheck("[email protected]").then(function(res){
console.log(res.status);//none
});
//enable did you mean
esc.syntaxCheck("[email protected]",true).then(function(res){
console.log(res.did_you_mean);//[email protected]
console.log(res.status);//free-email
});
esc.syntaxCheck("[email protected]").then(function(res){
console.log(res.status);//official
});
esc.syntaxCheck("[email protected]").then(function(res){
console.log(res.status);//role-based
});
esc.syntaxCheck("[email protected]").then(function(res){
console.log(res.status);//spam-trap
});
esc.syntaxCheck("[email protected]").then(function(res){
console.log(res.status);//disposable
});
Test
mocha
or npm test
check test folder and QUICKSTART.js for extra usage.