Comparing version 0.0.6 to 0.0.7
const dns = require('dns'); | ||
module.exports = function(emailAddress, cb) { | ||
'use strict'; | ||
let splitEmail = emailAddress.split('@'); | ||
var splitEmail = emailAddress.split('@'); | ||
dns.resolveMx(splitEmail[1], function(err, addresses){ | ||
@@ -7,0 +6,0 @@ if (addresses) { |
{ | ||
"name": "legit", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"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": "index.js", |
# Legit | ||
![Travis CI](https://travis-ci.org/martyndavies/legit.svg?branch=master) | ||
A wrapper for the NodeJS Dns.resolveMx method that checks the domain of an email address for valid/existence of MX records. | ||
@@ -17,6 +19,6 @@ | ||
if (validation == true) { | ||
console.log('This is a real email that can accept emails!'); | ||
console.log(JSON.stringify(addresses)); | ||
console.log('This is a real email that can accept emails!') | ||
console.log(JSON.stringify(addresses)) | ||
} else { | ||
console.log('Error: '+ err); | ||
console.log('Error: '+ err) | ||
} | ||
@@ -33,3 +35,3 @@ }); | ||
Copyright (c) 2015 Martyn Davies, and contributors. | ||
Copyright (c) 2015-2017 Martyn Davies, and contributors. | ||
@@ -36,0 +38,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
Sorry, the diff of this file is not supported yet
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
3826
41
42