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

smartystreets-javascript-sdk-utils

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartystreets-javascript-sdk-utils - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "smartystreets-javascript-sdk-utils",
"version": "1.2.0",
"version": "1.2.1",
"description": "Utils library to use with the SmartyStreets Javascript SDK",

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

@@ -21,3 +21,3 @@ function isInvalid ({result}) {

if (exactlyOneResult) {
if (result[0].analysis?.enhanced_match) {
if (result[0].analysis.enhanced_match) {
const enhancedMatch = result[0].analysis.enhanced_match.split(",");

@@ -24,0 +24,0 @@ return enhancedMatch.includes("none");

@@ -6,3 +6,3 @@ const isAmbiguous = require("../src/isAmbiguous");

const ambiguousAddress = {
result: [{}, {}]
result: [{}, {}],
};

@@ -9,0 +9,0 @@

@@ -7,3 +7,3 @@ const isInvalid = require("../src/isInvalid");

const invalidAddress = {
result: []
result: [],
};

@@ -15,2 +15,22 @@

it("is exactly one item and has no properties", function () {
const invalidAddress = {
result: [{}],
};
expect(isInvalid(invalidAddress)).toEqual(true);
expect(isValid(invalidAddress)).toEqual(false);
});
it("is exactly one item and has analysis as an empty object", function () {
const invalidAddress = {
result: [{
analysis: {},
}],
};
expect(isInvalid(invalidAddress)).toEqual(true);
expect(isValid(invalidAddress)).toEqual(false);
});
it("is exactly one item and has a verification status of 'None'", function () {

@@ -22,3 +42,3 @@ const invalidAddress = {

},
}]
}],
};

@@ -36,3 +56,3 @@

},
}]
}],
};

@@ -46,3 +66,3 @@

},
}]
}],
};

@@ -56,3 +76,3 @@

},
}]
}],
};

@@ -72,3 +92,3 @@

},
}]
}],
};

@@ -87,3 +107,3 @@

},
}]
}],
};

@@ -101,3 +121,3 @@

},
}]
}],
};

@@ -109,3 +129,3 @@ const noEnhancedMatch = {

},
}]
}],
};

@@ -112,0 +132,0 @@

@@ -6,3 +6,3 @@ const isMissingSecondary = require("../src/isMissingSecondary");

const nonAmbiguous = {
result: []
result: [],
};

@@ -19,3 +19,3 @@

},
}]
}],
};

@@ -27,3 +27,3 @@ const r1Address = {

},
}]
}],
};

@@ -35,8 +35,8 @@ const hSharpAddress = {

},
}]
}],
};
const noQualifyingFootnotesPresent = {
result: [{
analysis: {}
}]
analysis: {},
}],
};

@@ -55,4 +55,4 @@

enhanced_match: "postal-match",
}
}]
},
}],
};

@@ -64,4 +64,4 @@

enhanced_match: "unknown-secondary",
}
}]
},
}],
};

@@ -71,3 +71,3 @@

expect(isMissingSecondary(noSecondary)).toEqual(true);
})
});
});

@@ -11,3 +11,3 @@ const isValid = require("../src/isValid");

},
}]
}],
};

@@ -25,3 +25,3 @@

},
}]
}],
};

@@ -39,3 +39,3 @@

},
}]
}],
};

@@ -47,3 +47,3 @@ const dpvN = {

},
}]
}],
};

@@ -63,3 +63,3 @@

},
}]
}],
};

@@ -71,3 +71,3 @@ const enhancedMatchingMultipleResponse = {

},
}]
}],
};

@@ -74,0 +74,0 @@

Sorry, the diff of this file is not supported yet

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