smartystreets-javascript-sdk
Advanced tools
Comparing version 1.6.2 to 1.6.3
{ | ||
"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([]); | ||
}); | ||
}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
156424
88
3567
1