Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "xliff", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "xliff2js and js2xliff converter xliff utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,6 @@ const xml2js = require('xml2js'); | ||
const extractValue = (value) => { | ||
return typeof value !== 'string' ? value['_'] : value; | ||
}; | ||
parser.parseString(str, (err, data) => { | ||
@@ -36,7 +40,7 @@ if (err) return cb(err); | ||
if (entry.source) { | ||
result.resources[namespace][key].source = entry.source[0]; | ||
result.resources[namespace][key].source = extractValue(entry.source[0]); | ||
} | ||
if (entry.target) { | ||
result.resources[namespace][key].target = entry.target[0]; | ||
result.resources[namespace][key].target = extractValue(entry.target[0]); | ||
} | ||
@@ -43,0 +47,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
25277
492