aboutsummaryrefslogtreecommitdiff
path: root/node_modules/xmlbuilder/lib/XMLAttribute.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/xmlbuilder/lib/XMLAttribute.js')
-rw-r--r--node_modules/xmlbuilder/lib/XMLAttribute.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/node_modules/xmlbuilder/lib/XMLAttribute.js b/node_modules/xmlbuilder/lib/XMLAttribute.js
index 51ccebe52..f6c6bd8d0 100644
--- a/node_modules/xmlbuilder/lib/XMLAttribute.js
+++ b/node_modules/xmlbuilder/lib/XMLAttribute.js
@@ -1,10 +1,11 @@
-// Generated by CoffeeScript 1.10.0
+// Generated by CoffeeScript 1.9.1
(function() {
- var XMLAttribute;
+ var XMLAttribute, create;
+
+ create = require('lodash/create');
module.exports = XMLAttribute = (function() {
function XMLAttribute(parent, name, value) {
- this.options = parent.options;
this.stringify = parent.stringify;
if (name == null) {
throw new Error("Missing attribute name of element " + parent.name);
@@ -17,11 +18,11 @@
}
XMLAttribute.prototype.clone = function() {
- return Object.create(this);
+ return create(XMLAttribute.prototype, this);
};
- XMLAttribute.prototype.toString = function(options) {
- return this.options.writer.set(options).attribute(this);
+ XMLAttribute.prototype.toString = function(options, level) {
+ return ' ' + this.name + '="' + this.value + '"';
};
return XMLAttribute;