aboutsummaryrefslogtreecommitdiff
path: root/node_modules/xmlbuilder/lib/XMLBuilder.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/xmlbuilder/lib/XMLBuilder.js')
-rw-r--r--node_modules/xmlbuilder/lib/XMLBuilder.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/node_modules/xmlbuilder/lib/XMLBuilder.js b/node_modules/xmlbuilder/lib/XMLBuilder.js
deleted file mode 100644
index 42828338e..000000000
--- a/node_modules/xmlbuilder/lib/XMLBuilder.js
+++ /dev/null
@@ -1,69 +0,0 @@
-// Generated by CoffeeScript 1.9.1
-(function() {
- var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier;
-
- XMLStringifier = require('./XMLStringifier');
-
- XMLDeclaration = require('./XMLDeclaration');
-
- XMLDocType = require('./XMLDocType');
-
- XMLElement = require('./XMLElement');
-
- module.exports = XMLBuilder = (function() {
- function XMLBuilder(name, options) {
- var root, temp;
- if (name == null) {
- throw new Error("Root element needs a name");
- }
- if (options == null) {
- options = {};
- }
- this.options = options;
- this.stringify = new XMLStringifier(options);
- temp = new XMLElement(this, 'doc');
- root = temp.element(name);
- root.isRoot = true;
- root.documentObject = this;
- this.rootObject = root;
- if (!options.headless) {
- root.declaration(options);
- if ((options.pubID != null) || (options.sysID != null)) {
- root.doctype(options);
- }
- }
- }
-
- XMLBuilder.prototype.root = function() {
- return this.rootObject;
- };
-
- XMLBuilder.prototype.end = function(options) {
- return this.toString(options);
- };
-
- XMLBuilder.prototype.toString = function(options) {
- var indent, newline, offset, pretty, r, ref, ref1, ref2;
- pretty = (options != null ? options.pretty : void 0) || false;
- indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' ';
- offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0;
- newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n';
- r = '';
- if (this.xmldec != null) {
- r += this.xmldec.toString(options);
- }
- if (this.doctype != null) {
- r += this.doctype.toString(options);
- }
- r += this.rootObject.toString(options);
- if (pretty && r.slice(-newline.length) === newline) {
- r = r.slice(0, -newline.length);
- }
- return r;
- };
-
- return XMLBuilder;
-
- })();
-
-}).call(this);