smartystreets-javascript-sdk-utils
Advanced tools
Comparing version 1.2.3 to 1.2.4
{ | ||
"name": "smartystreets-javascript-sdk-utils", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Utils library to use with the Smarty Javascript SDK", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -21,4 +21,4 @@ function isInvalid ({result}) { | ||
if (exactlyOneResult) { | ||
if (result[0].analysis.enhanced_match) { | ||
const enhancedMatch = result[0].analysis.enhanced_match.split(","); | ||
if (result[0].analysis.enhancedMatch) { | ||
const enhancedMatch = result[0].analysis.enhancedMatch.split(","); | ||
return enhancedMatch.includes("none"); | ||
@@ -25,0 +25,0 @@ } |
@@ -8,3 +8,3 @@ function isMissingSecondary ({result}) { | ||
const enhancedMatchingResponse = result[0].analysis.enhanced_match; | ||
const enhancedMatchingResponse = result[0].analysis.enhancedMatch; | ||
@@ -11,0 +11,0 @@ if (enhancedMatchingResponse) { |
@@ -111,3 +111,3 @@ const isInvalid = require("../src/isInvalid"); | ||
analysis: { | ||
enhanced_match: "none-postal-match,postal-match,none", | ||
enhancedMatch: "none-postal-match,postal-match,none", | ||
}, | ||
@@ -119,3 +119,3 @@ }], | ||
analysis: { | ||
enhanced_match: "", | ||
enhancedMatch: "", | ||
}, | ||
@@ -122,0 +122,0 @@ }], |
@@ -50,3 +50,3 @@ const isMissingSecondary = require("../src/isMissingSecondary"); | ||
analysis: { | ||
enhanced_match: "postal-match", | ||
enhancedMatch: "postal-match", | ||
}, | ||
@@ -59,3 +59,3 @@ }], | ||
analysis: { | ||
enhanced_match: "unknown-secondary", | ||
enhancedMatch: "unknown-secondary", | ||
}, | ||
@@ -62,0 +62,0 @@ }], |
@@ -57,3 +57,3 @@ const isValid = require("../src/isValid"); | ||
analysis: { | ||
enhanced_match: "postal-match", | ||
enhancedMatch: "postal-match", | ||
}, | ||
@@ -65,3 +65,3 @@ }], | ||
analysis: { | ||
enhanced_match: "postal-match,missing-secondary,unknown-secondary", | ||
enhancedMatch: "postal-match,missing-secondary,unknown-secondary", | ||
}, | ||
@@ -71,2 +71,3 @@ }], | ||
expect(isValid(enhancedMatchingOneResponse)).toEqual(true); | ||
expect(isInvalid(enhancedMatchingOneResponse)).toEqual(false); | ||
@@ -73,0 +74,0 @@ expect(isInvalid(enhancedMatchingMultipleResponse)).toEqual(false); |
26412
293