mailgun-js
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -154,3 +154,3 @@ var tsscmp = require('tsscmp'); | ||
Mailgun.prototype.validate = function (address, private, opts, fn) { | ||
Mailgun.prototype.validate = function (address, isPrivate, opts, fn) { | ||
if (typeof opts === 'function') { | ||
@@ -161,14 +161,14 @@ fn = opts; | ||
if (typeof private === 'object') { | ||
opts = private; | ||
private = false; | ||
if (typeof isPrivate === 'object') { | ||
opts = isPrivate; | ||
isPrivate = false; | ||
} | ||
if (typeof private === 'function') { | ||
fn = private; | ||
private = false; | ||
if (typeof isPrivate === 'function') { | ||
fn = isPrivate; | ||
isPrivate = false; | ||
opts = {}; | ||
} | ||
var resource = private ? `/address/private/validate` : `/address/validate`; | ||
var resource = isPrivate ? `/address/private/validate` : `/address/validate`; | ||
var options = this.getRequestOptions(resource); | ||
@@ -181,3 +181,3 @@ | ||
Mailgun.prototype.parse = function (addresses, private, opts, fn) { | ||
Mailgun.prototype.parse = function (addresses, isPrivate, opts, fn) { | ||
if (typeof opts === 'function') { | ||
@@ -188,14 +188,14 @@ fn = opts; | ||
if (typeof private === 'object') { | ||
opts = private; | ||
private = false; | ||
if (typeof isPrivate === 'object') { | ||
opts = isPrivate; | ||
isPrivate = false; | ||
} | ||
if (typeof private === 'function') { | ||
fn = private; | ||
private = false; | ||
if (typeof isPrivate === 'function') { | ||
fn = isPrivate; | ||
isPrivate = false; | ||
opts = {}; | ||
} | ||
var resource = private ? `/address/private/parse` : `/address/parse`; | ||
var resource = isPrivate ? `/address/private/parse` : `/address/parse`; | ||
var options = this.getRequestOptions(resource); | ||
@@ -202,0 +202,0 @@ |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"homepage": "https://github.com/bojand/mailgun-js", | ||
@@ -11,0 +11,0 @@ "license": "MIT", |
@@ -325,3 +325,3 @@ # mailgun.js | ||
Module works with Node-style callbacks, but also implements promises with the [Q](http://github.com/kriskowal/q) library. | ||
Module works with Node-style callbacks, but also implements promises with the [promisify-call](https://www.npmjs.com/package/promisify-call) library. | ||
@@ -328,0 +328,0 @@ ```js |
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
96599
10
2528