xmlbuilder
Advanced tools
Comparing version 0.1.2 to 0.1.3
(function() { | ||
var XMLBuilder; | ||
XMLBuilder = require('./XMLBuilder'); | ||
module.exports = new XMLBuilder(); | ||
module.exports.create = function() { | ||
return new XMLBuilder(); | ||
}; | ||
}).call(this); |
@@ -13,6 +13,6 @@ (function() { | ||
XMLBuilder = (function() { | ||
__extends(XMLBuilder, XMLFragment); | ||
function XMLBuilder() { | ||
XMLBuilder.__super__.constructor.call(this, null, '', {}, ''); | ||
} | ||
__extends(XMLBuilder, XMLFragment); | ||
XMLBuilder.prototype.begin = function(name, xmldec, doctype, options) { | ||
@@ -19,0 +19,0 @@ var att, child, root; |
@@ -19,7 +19,11 @@ (function() { | ||
this.assertLegalChar(name); | ||
attributes != null ? attributes : attributes = {}; | ||
if (attributes != null) { | ||
attributes; | ||
} else { | ||
attributes = {}; | ||
}; | ||
if (this.is(attributes, 'String') && this.is(text, 'Object')) { | ||
_ref = [text, attributes], attributes = _ref[0], text = _ref[1]; | ||
} else if (this.is(attributes, 'String')) { | ||
_ref2 = [{}, attribues], attributes = _ref2[0], text = _ref2[1]; | ||
_ref2 = [{}, attributes], attributes = _ref2[0], text = _ref2[1]; | ||
} | ||
@@ -109,3 +113,7 @@ for (key in attributes) { | ||
value = '' + value || ''; | ||
(_ref = this.attributes) != null ? _ref : this.attributes = {}; | ||
if ((_ref = this.attributes) != null) { | ||
_ref; | ||
} else { | ||
this.attributes = {}; | ||
}; | ||
this.attributes[name] = this.escape(value); | ||
@@ -216,3 +224,3 @@ return this; | ||
XMLFragment.prototype.u = function() { | ||
return this.up; | ||
return this.up(); | ||
}; | ||
@@ -219,0 +227,0 @@ return XMLFragment; |
{ | ||
"name" : "xmlbuilder", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "An XML builder for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Ozgur Ozcitak <oozcitak@gmail.com>", |
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
10650
314