Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

email-address-validation

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-address-validation - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

api/check.js

@@ -107,2 +107,4 @@ 'use strict';

API.PARAM_CATCH_ALL = 'catch_all';
API.PARAM_CATCH_ALL_TRUE = 1;
API.PARAM_CATCH_ALL_FALSE = 0;
API.PARAM_ROLE = 'role';

@@ -109,0 +111,0 @@ API.PARAM_DISPOSABLE = 'disposable';

2

package.json
{
"name": "email-address-validation",
"version": "0.1.3",
"version": "0.1.4",
"description": "Email Validation & Verification JSON API for Developers. Simple REST API measuring email deliverability & quality",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,6 +6,2 @@ var path = require('path');

var api = new API({
access_key: process.env.ACCESS_KEY
});
// TEST START

@@ -20,7 +16,11 @@ var chai = require('chai');

var user = 'this.is.a';
var domain = 'test.io';
var email = ''+ user +'@'+ domain;
it('basic', function (done) {
var user = 'this.is.a';
var domain = 'test.io';
var email = ''+ user +'@'+ domain;
var api = new API({
access_key: process.env.ACCESS_KEY
});

@@ -36,4 +36,5 @@ // Check Query

expect(result).is.not.null;
expect(result).property('user').equals(user);
expect(result).property('domain').equals(domain);
expect(result).property(api.check.PARAM_USER).equals(user);
expect(result).property(api.check.PARAM_DOMAIN).equals(domain);
expect(result).property(api.check.PARAM_CATCH_ALL).to.be.null;

@@ -46,2 +47,54 @@ done(null, result);

});
it('basic - w. catch-all', function (done) {
var api = new API({
access_key: process.env.ACCESS_KEY
});
// Check Query
var query = {
email: email,
catch_all: api.check.PARAM_CATCH_ALL_TRUE
};
api.check(query)
.then(function (result) {
expect(result).is.not.null;
expect(result).property(api.check.PARAM_USER).equals(user);
expect(result).property(api.check.PARAM_DOMAIN).equals(domain);
expect(result).property(api.check.PARAM_CATCH_ALL).to.be.a('boolean');
done(null, result);
})
.catch(function (err) {
done(err);
});
});
it('basic - w. catch-all on free account', function (done) {
var api = new API({
access_key: process.env.ACCESS_KEY_FREE
});
// Check Query
var query = {
email: email,
catch_all: api.check.PARAM_CATCH_ALL_TRUE
};
api.check(query)
.then(function (result) {
expect(result).is.null;
done(result);
})
.catch(function (err) {
expect(err).property('code').equals(310);
done(null, err);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc