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

smartystreets-javascript-sdk

Package Overview
Dependencies
Maintainers
4
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.11.0 to 1.11.1

2

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

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

@@ -32,5 +32,5 @@ const Errors = require("../Errors");

function buildSuggestionsFromResponse(payload) {
if (payload === null) return [];
if (payload && payload.candidates === null) return [];
return payload.map(suggestion => new Suggestion(suggestion));
return payload.candidates.map(suggestion => new Suggestion(suggestion));
}

@@ -37,0 +37,0 @@ }

@@ -51,14 +51,17 @@ const chai = require("chai");

const responseData = {
"street": "L alleya",
"locality": "Novosibirsk",
"administrative_area": "Novosibirskaya oblast'",
"postal_code": "40000",
"country_iso3": "RUS",
candidates: [
{
"street": "L alleya",
"locality": "Novosibirsk",
"administrative_area": "Novosibirskaya oblast'",
"postal_code": "40000",
"country_iso3": "RUS",
}
]
};
let mockExpectedPayload = [responseData];
let mockSender = new MockSenderWithResponse(mockExpectedPayload);
let mockSender = new MockSenderWithResponse(responseData);
let client = new Client(mockSender);
let lookup = new Lookup("f");
let expectedSuggestion = new Suggestion(responseData);
let expectedSuggestion = new Suggestion(responseData.candidates[0]);

@@ -65,0 +68,0 @@ return client.send(lookup).then(() => {

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