Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsontoxml

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsontoxml - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

13

jsontoxml.js

@@ -9,3 +9,4 @@ //copyright Ryan Day 2010 <http://ryanday.org>, Joscha Feth 2013 <http://www.feth.com> [MIT Licensed]

var indent = options.prettyPrint ? '\n' + new Array(level).join("\t") : '';
var indent_value = options.indent !== undefined ? options.indent : "\t";
var indent = options.prettyPrint ? '\n' + new Array(level).join(indent_value) : '';

@@ -125,3 +126,5 @@ var node = [indent, '<',name, (attributes || '')];

if(typeof obj == 'string' || isBuffer(obj)) {
var Buffer = this.Buffer || function Buffer () {};
if(typeof obj == 'string' || obj instanceof Buffer) {
try{

@@ -183,7 +186,1 @@ obj = JSON.parse(obj.toString());

};
function isBuffer(b){
if(typeof Buffer == 'undefined') return false;
return (b instanceof Buffer);
}
{
"name": "jsontoxml",
"version": "0.0.8",
"version": "0.0.9",
"description": "This is a library designed to render js objects as xml. Its not made to parse or otherwise edit existing xml/html structures.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/soldair/node-jsontoxml",

@@ -77,2 +77,3 @@ [![Build Status](https://secure.travis-ci.org/soldair/node-jsontoxml.png)](http://travis-ci.org/soldair/node-jsontoxml)

- `prettyPrint` if truthy the output gets a rudimentary pretty print (good for debugging, don't expect too much)
- `indent` specify what unit you would like to indent by (spaces, tabstop, nothing - pass an empty string)

@@ -86,4 +87,4 @@

`jsontoxml.cdata (string)`
* wraps string with `<!CDATA[[ ]]>`
* wraps string with `<![CDATA[ ]]>`
* removes all occurences of close cdata (`]]>`) in input text

@@ -90,0 +91,0 @@

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