From d1291f67551c58168af43698a359cb5ddfd266b0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 3 Nov 2016 01:33:53 +0100 Subject: node_modules --- node_modules/xmlbuilder/lib/XMLText.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 node_modules/xmlbuilder/lib/XMLText.js (limited to 'node_modules/xmlbuilder/lib/XMLText.js') diff --git a/node_modules/xmlbuilder/lib/XMLText.js b/node_modules/xmlbuilder/lib/XMLText.js new file mode 100644 index 000000000..8241581ed --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLText.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.10.0 +(function() { + var XMLNode, XMLText, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + module.exports = XMLText = (function(superClass) { + extend(XMLText, superClass); + + function XMLText(parent, text) { + XMLText.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing element text"); + } + this.value = this.stringify.eleText(text); + } + + XMLText.prototype.clone = function() { + return Object.create(this); + }; + + XMLText.prototype.toString = function(options) { + return this.options.writer.set(options).text(this); + }; + + return XMLText; + + })(XMLNode); + +}).call(this); -- cgit v1.2.3