🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

xml2json

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml2json - npm Package Compare versions

Comparing version

to
0.2.1

8

lib/json2xml.js

@@ -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",