Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.2.0 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc