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

smartystreets-javascript-sdk

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartystreets-javascript-sdk - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

src/us_reverse_geo/Response.js

2

package.json
{
"name": "smartystreets-javascript-sdk",
"version": "1.6.2",
"version": "1.6.3",
"description": "Quick and easy SmartyStreets address validation.",

@@ -5,0 +5,0 @@ "keywords": [

const Request = require("../Request");
const Response = require("./Response");
const buildInputData = require("../util/buildInputData");

@@ -32,3 +33,3 @@ const keyTranslationFormat = require("../util/apiToSDKKeyMap").usReverseGeo;

function attachLookupResults(response, lookup) {
lookup.response = response.payload;
lookup.response = new Response(response.payload);

@@ -35,0 +36,0 @@ return lookup;

@@ -0,1 +1,3 @@

const Response = require("./Response");
/**

@@ -10,3 +12,3 @@ * In addition to holding all of the input data for this lookup, this class also<br>

this.longitude = longitude.toFixed(8);
this.response = [];
this.response = new Response();
}

@@ -13,0 +15,0 @@ }

@@ -9,2 +9,3 @@ const chai = require("chai");

const MockSenderWithResponse = require("../fixtures/mock_senders").MockSenderWithResponse;
const Response = require("../../src/us_reverse_geo/Response");

@@ -28,3 +29,3 @@ describe("A US Reverse Geo client", function () {

"accuracy": "Rooftop",
"license": 0
"license": "SmartyStreets"
},

@@ -45,6 +46,7 @@ "distance": 2.7207432,

return client.send(lookup).then(response => {
return client.send(lookup).then(() => {
expect(lookup.response).to.deep.equal(expectedMockPayload);
expect(lookup.response).to.be.an.instanceOf(Response);
});
});
});

@@ -6,3 +6,2 @@ const chai = require("chai");

describe("A US Reverse Geo lookup", function () {
it("correctly populates fields.", function () {

@@ -13,4 +12,4 @@ let lookup = new Lookup(44.888888888, -111.111111111);

expect(lookup.longitude).to.equal("-111.11111111");
expect(lookup.response).to.deep.equal([]);
expect(lookup.response.results).to.deep.equal([]);
});
});
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