Comparing version 0.2.0 to 0.2.1
@@ -1,3 +0,3 @@ | ||
var xml = ''; | ||
module.exports = function toXml(json) { | ||
module.exports = function toXml(json, xml) { | ||
var xml = xml || ''; | ||
if (json instanceof Buffer) { | ||
@@ -29,3 +29,3 @@ json = json.toString(); | ||
xml += '<' + key + '>'; | ||
toXml(elems[j]); | ||
xml = toXml(elems[j], xml); | ||
xml += '</' + key + '>'; | ||
@@ -35,3 +35,3 @@ } | ||
xml += '<' + key + '>'; | ||
toXml(obj[key]); | ||
xml = toXml(obj[key], xml); | ||
xml += '</' + key + '>'; | ||
@@ -38,0 +38,0 @@ } else if (typeof(obj[key]) == 'string') { |
{ "name" : "xml2json", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Andrew Turley", | ||
@@ -4,0 +4,0 @@ "email": "aturley@buglabs.net", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9024
0