legit
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "legit", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Check that email addresses are really able to accept emails by pinging the DNS and checking for active MX records.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -1,9 +0,9 @@ | ||
const dns = require("dns"); | ||
const dns = require('dns'); | ||
const validateEmailAddress = emailAddress => { | ||
return new Promise((resolve, reject) => { | ||
const splitEmail = emailAddress.split("@"); | ||
const splitEmail = emailAddress.split('@'); | ||
dns.resolveMx(splitEmail[1], (err, mx) => { | ||
if (typeof mx != "undefined") { | ||
if (typeof mx != 'undefined') { | ||
mx | ||
@@ -13,3 +13,3 @@ ? resolve({ isValid: true, mxArray: mx }) | ||
} else { | ||
reject(err); | ||
reject(new Error(err)); | ||
} | ||
@@ -16,0 +16,0 @@ }); |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
3530