@itentialopensource/adapter-utils
Advanced tools
Comparing version 4.12.0 to 4.13.0
## 4.13.0 [08-29-2019] | ||
* Resolves PH-41588 parsing of individual fields | ||
Closes PH-41588 | ||
See merge request itentialopensource/adapter-utils!109 | ||
--- | ||
## 4.12.0 [08-28-2019] | ||
@@ -3,0 +13,0 @@ |
@@ -65,2 +65,13 @@ /* @copyright Itential, LLC 2018-9 */ | ||
if (type === 'string') { | ||
// if the string is parseable JSON | ||
if (dataSchema && dataSchema.parse) { | ||
try { | ||
return JSON.parse(object[0]); | ||
} catch (ex) { | ||
log.warn(`${origin}: Could not parse data in field`); | ||
} | ||
} | ||
} | ||
return object[0]; | ||
@@ -74,2 +85,13 @@ } | ||
if (type === 'string') { | ||
// if the string is parseable JSON | ||
if (dataSchema && dataSchema.parse) { | ||
try { | ||
return JSON.parse(object); | ||
} catch (ex) { | ||
log.warn(`${origin}: Could not parse data in field`); | ||
} | ||
} | ||
} | ||
return object; | ||
@@ -76,0 +98,0 @@ } |
{ | ||
"name": "@itentialopensource/adapter-utils", | ||
"version": "4.12.0", | ||
"version": "4.13.0", | ||
"description": "Itential Adapter Utility Libraries", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
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
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
1126718
10174