email-verifier
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -51,5 +51,11 @@ "use strict"; | ||
* @param {string} email - The email address to verify. | ||
* @param {object} opts - An object that contains all options. | ||
* @param {callback} cb - The callback to run after verification has finished. | ||
*/ | ||
verify(email, cb) { | ||
verify(email, opts, cb) { | ||
if (!cb) { | ||
cb = opts; | ||
opts = {}; | ||
} | ||
let call = backoff.call(request, { | ||
@@ -66,2 +72,3 @@ uri: VERIFY_URI, | ||
checkDisposable: (this.opts.checkDisposable === false ? false : true), | ||
_hardRefresh: (opts.hardRefresh === true ? 1 : 0), | ||
outputFormat: "json" | ||
@@ -68,0 +75,0 @@ } |
{ | ||
"name": "email-verifier", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "The best possible way to verify and validate an email address.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -140,2 +140,20 @@ # node-email-verifier | ||
If, for some reason, you notice that a particular email's `validateSMTP` status | ||
is incorrect, this usually means that the person's email provider has recently | ||
changed. The email verification API services caches SMTP checks for speed | ||
purposes, but you can force a cache refresh by specifying the optional | ||
`hardRefresh` option when making a query. | ||
For instance: | ||
```javascript | ||
const Verifier = require("email-verifier"); | ||
let verifier = new Verifier("your_email_verification_api_key"); | ||
verifier.verify("r@rdegges.com", { hardRefresh: true }, (err, data) => { | ||
if (err) throw err; | ||
console.log(data); | ||
}); | ||
``` | ||
By default, this library also handles retrying failed HTTP requests for you. For | ||
@@ -162,2 +180,6 @@ instance: if the verification API service is currently down or having issues, | ||
0.4.0: *05-06-2018* | ||
- Adding support for the `hardRefresh` API option. | ||
0.3.0: *4-15-2018* | ||
@@ -164,0 +186,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
199
12342
5
128