Comparing version 1.0.7 to 1.0.8
const legit = require("../src/index.js"); | ||
legit("martyn@martyndavies.me") | ||
legit("martyn@notadomainzzzzzzzzz.me") | ||
.then(result => { | ||
@@ -5,0 +5,0 @@ result.isValid ? console.log("Valid!") : console.log("Invalid!"); |
{ | ||
"name": "legit", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"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", |
@@ -12,4 +12,6 @@ const dns = require('dns'); | ||
: resolve({ isValid: false, mxArray: null }); | ||
} else if (err.code == 'ENOTFOUND') { | ||
resolve({ isValid: false, mxArray: null, mxRecordSetExists: false}); | ||
} else { | ||
reject(new Error(err)); | ||
reject(new Error(err.code)); | ||
} | ||
@@ -16,0 +18,0 @@ }); |
@@ -8,3 +8,3 @@ const assert = require('assert'); | ||
it('should return true when email is legit', function() { | ||
legit('martyn@nexmo.com') | ||
legit('martyn@vonage.com') | ||
.then( | ||
@@ -11,0 +11,0 @@ result => |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5163
47