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

smartystreets-javascript-sdk

Package Overview
Dependencies
Maintainers
1
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.1.0 to 1.1.2

2

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

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

@@ -50,2 +50,4 @@ const Errors = require("../Errors");

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

@@ -52,0 +54,0 @@ }

@@ -78,2 +78,14 @@ const chai = require("chai");

it("returns an empty array when no suggestions are returned.", () => {
let mockExpectedPayload = {suggestions: null};
let mockSender = new MockSenderWithResponse(mockExpectedPayload);
let client = new Client(mockSender);
let lookup = new Lookup("Please let this be easy to test.");
let expectedSuggestion = [];
return client.send(lookup).then(response => {
expect(lookup.result).to.deep.equal(expectedSuggestion);
});
});
it("attaches suggestions from a response to a lookup.", function () {

@@ -80,0 +92,0 @@ const responseData = {

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