emailvalidation
Advanced tools
Comparing version 0.3.8 to 0.3.9
@@ -16,3 +16,3 @@ var http = require('http'); | ||
validator.prototype.validate = function(email, fn) { | ||
validator.prototype.validate = function(email, vericationlevel, fn) { | ||
@@ -34,3 +34,3 @@ // There should be a public key | ||
hostname: 'api.emailvalidator.co', | ||
path: '/?AccessKey='+this.pubKey+'&EmailAddress='+email+'&VerificationLevel=3', | ||
path: '/?AccessKey='+this.pubKey+'&EmailAddress='+email+'&VerificationLevel='+vericationlevel, | ||
method: 'GET' | ||
@@ -37,0 +37,0 @@ }; |
{ | ||
"name": "emailvalidation", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"description": "A module for validating emails using the emailvalidation.co API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,15 +20,11 @@ Email Validator | ||
``` npm install emailvalidation --save | ||
``` | ||
npm install emailvalidation --save | ||
## Usage | ||
``` var Validator = require('emailvalidator'); | ||
var validator = new Validator('your-api-key'); | ||
var Validator = require('emailvalidator'); | ||
var validator = new Validator('your-api-key'); | ||
validator.validate(email, function(err, response)) { | ||
console.log(response.IsValid); //Will return true or false | ||
}); | ||
``` | ||
validator.validate(email, verificationlevel, function(err, response)) { | ||
console.log(response.IsValid); //Returns true or false | ||
}); |
4685
30