New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cdyne-address

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdyne-address - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

34

lib/cdyne-address.js

@@ -32,15 +32,15 @@ var request = require('request'),

case (1):
desc = 'Invalid input';
desc = 'Invalid input.';
break;
case (2):
desc = 'Invalid License Key';
desc = 'Invalid License Key.';
break;
case (10):
desc = 'Input address is not found';
desc = 'Input address is not found.';
break;
case (101):
desc = 'Input address is found, but not DPV confirmed';
desc = 'Input address is found, but not DPV confirmed.';
break;
case (102):
desc = 'Input address primary number is DPV confirmed. Secondary number is present but not DPV confirmed';
desc = 'Input address primary number is DPV confirmed. Secondary number is present but not DPV confirmed.';
break;

@@ -74,8 +74,22 @@ case (103):

}, function(error, response, body) {
if (!error && body.ReturnCode !== 100 )
{
var description = _this._getReturnCodeInfo(body.ReturnCode);
error = new Error(description);
if (!body || body.ReturnCode === 1 || body.ReturnCode === 2 || body.ReturnCode === 10 ) {
var errorDescription;
if (body){
errorDescription = _this._getReturnCodeInfo(body.ReturnCode);
} else {
errorDescription = 'Server unavailable.';
}
// these are failing ReturnCodes, return Error
error = new Error(errorDescription);
error.name = body.ReturnCode;
return callback(error);
}
callback(error, body || {});
// success case, add ReturnCodeText to hold additional information
// about the ReturnCode we've received
var description = _this._getReturnCodeInfo(body.ReturnCode);
body.ReturnCodeText = description;
callback(null, body);
});

@@ -82,0 +96,0 @@ };

{
"name": "cdyne-address",
"version": "0.1.2",
"version": "0.1.3",
"description": "CDYNE Postal Address Verification API node.js wrapper",

@@ -5,0 +5,0 @@ "main": "./lib/cdyne-address.js",

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