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.10.5 to 1.10.6

2

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

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

class Lookup {
constructor(search, country = "United States") {
constructor(search = "", country = "United States", include_only_administrative_area = "", include_only_locality = "", include_only_postal_code = "") {
this.result = [];

@@ -7,2 +7,5 @@

this.country = country;
this.include_only_administrative_area = include_only_administrative_area;
this.include_only_locality = include_only_locality;
this.include_only_postal_code = include_only_postal_code;
}

@@ -9,0 +12,0 @@ }

@@ -23,2 +23,29 @@ const chai = require("chai");

});
it("Set include only administrative area param", function () {
const administrativeArea = "administrative area";
const expectedPrefix = "z";
let lookup = new Lookup(expectedPrefix, "Utah", administrativeArea);
expect(lookup.include_only_administrative_area).to.equal(administrativeArea);
});
it("Set include only locality param", function () {
const locality = "locality";
const expectedPrefix = "z";
let lookup = new Lookup(expectedPrefix, "Utah", "test", locality);
expect(lookup.include_only_locality).to.equal(locality);
});
it("Set include only postal code param", function () {
const postalCode = "locality";
const expectedPrefix = "z";
let lookup = new Lookup(expectedPrefix, "Utah", "test", "test", postalCode);
expect(lookup.include_only_postal_code).to.equal(postalCode);
});
it("Checking defaults of params on instantiation ", function () {
const defaultLookup = new Lookup("", "United States", "", "", "");
let lookup = new Lookup();
expect(lookup).to.eql(defaultLookup);
});
});
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