Comparing version 0.1.1 to 0.1.2
@@ -56,2 +56,4 @@ /** | ||
if(typeof node === 'undefined' || null === node) node = ''; | ||
if(opts.attributes_key && json[opts.attributes_key]){ | ||
@@ -58,0 +60,0 @@ Object.keys(json[opts.attributes_key]).forEach(function(k){ |
{ | ||
"name": "json2xml", | ||
"description": "Simple JavaScript Object to XML string converter.", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/alanclarke/node-json2xml", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/estheban/node-json2xml", | ||
"author": { | ||
@@ -46,7 +46,4 @@ "name": "Etienne Lachance", | ||
"readme": "node-json2xml\n===========\n\nDescription\n-----------\n\nSimple JavaScript Object to XML string converter.\n\nInstallation\n------------\n\nSimplest way to install `json2xml` is to use [npm](http://npmjs.org), just `npm\ninstall json2xml` which will download json2xml and all dependencies.\n\nSimple usage\n-----------\n \n var json2xml = require('json2xml');\n json2xml({a:1});\n //<a>1</a>\n\t \n\nOptions\n-----------\n\n\tadd header:\n\n\tjson2xml({a:1}, { header:true });\n\t//<?xml version=\"1.0\" encoding=\"UTF-8\"?><a>1</a>\n\n\tadd node attributes:\n\n\tjson2xml({a:1, attr:{b:2,c:3 }}, { attributes_key:'attr' });\t\n\t// <a b=\"2\" c=\"3\" >1</a>", | ||
"_id": "json2xml@0.1.1", | ||
"dist": { | ||
"shasum": "03d51836b3b3e9a53980132e3a3d07c50bb7d9ec" | ||
}, | ||
"_from": "git://github.com/alanclarke/node-json2xml.git" | ||
"_id": "json2xml@0.1.2", | ||
"_from": "git://github.com/estheban/node-json2xml.git" | ||
} |
@@ -35,4 +35,6 @@ var json2xml = require('../lib/json2xml.js'); | ||
'opts': function(test) { | ||
test.expect(6); | ||
test.expect(8); | ||
test.equal(json2xml({a:''}),'<a/>'); | ||
test.equal(json2xml({a:null}),'<a/>'); | ||
test.equal(json2xml({a:undefined}),'<a/>'); | ||
@@ -45,3 +47,3 @@ test.equal(json2xml({a:1}),'<a>1</a>'); | ||
test.equal(json2xml({a:1}, { header:true }),'<?xml version="1.0" encoding="UTF-8"?><a>1</a>'); | ||
test.equal(json2xml({a:1, attr:{b:2,c:3 }}, { attributes_key:'attr' }), '<a b="2" c="3">1</a>'); | ||
test.equal(json2xml({a:1, attr:{b:2,c:3 }}, { attributes_key:'attr' }), '<a b="2" c="3">1</a>'); | ||
test.done(); | ||
@@ -48,0 +50,0 @@ } |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8060
140
0