tfk-360-unwrap-contact
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -9,4 +9,4 @@ 'use strict' | ||
if (contact.GetPrivatePersonsResult && contact.GetPrivatePersonsResult.PrivatePersons) { | ||
if (contact.GetPrivatePersonsResult.PrivatePersons.PrivatePersonBase) { | ||
if (contact.GetPrivatePersonsResult) { | ||
if (contact.GetPrivatePersonsResult.PrivatePersons && contact.GetPrivatePersonsResult.PrivatePersons.PrivatePersonBase) { | ||
if (contact.GetPrivatePersonsResult.PrivatePersons.PrivatePersonBase.length === 1) { | ||
@@ -13,0 +13,0 @@ person = contact.GetPrivatePersonsResult.PrivatePersons.PrivatePersonBase[0] |
{ | ||
"name": "tfk-360-unwrap-contact", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Unwraps GetPrivatePersonsResult from Public 360", | ||
@@ -39,2 +39,2 @@ "license": "MIT", | ||
} | ||
} | ||
} |
@@ -40,2 +40,10 @@ 'use strict' | ||
tap.test('It returns false if no person found', function (test) { | ||
var contact = require('./data/GetPrivatePersonsResultNoneFoundNull.json') | ||
var expected = false | ||
var result = unwrapContact(contact) | ||
tap.equal(JSON.stringify(result), JSON.stringify(expected), 'Contact returned false OK') | ||
test.done() | ||
}) | ||
tap.test('It returns expected result', function (test) { | ||
@@ -42,0 +50,0 @@ var contact = require('./data/GetPrivatePersonsResult.json') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9305
13
159
1