Socket
Socket
Sign inDemoInstall

xmlbuilder

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmlbuilder - npm Package Compare versions

Comparing version 2.5.2 to 2.6.0

2

lib/index.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -3,0 +3,0 @@ var XMLBuilder, assign;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -3,0 +3,0 @@ var XMLAttribute, create;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -46,7 +46,7 @@ var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier;

XMLBuilder.prototype.toString = function(options) {
var indent, newline, offset, pretty, r, _ref, _ref1, _ref2;
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';
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 = '';

@@ -53,0 +53,0 @@ if (this.xmldec != null) {

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLCData, XMLNode, create,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -11,4 +11,4 @@ create = require('lodash/object/create');

module.exports = XMLCData = (function(_super) {
__extends(XMLCData, _super);
module.exports = XMLCData = (function(superClass) {
extend(XMLCData, superClass);

@@ -28,7 +28,7 @@ function XMLCData(parent, text) {

XMLCData.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -35,0 +35,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLComment, XMLNode, create,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -11,4 +11,4 @@ create = require('lodash/object/create');

module.exports = XMLComment = (function(_super) {
__extends(XMLComment, _super);
module.exports = XMLComment = (function(superClass) {
extend(XMLComment, superClass);

@@ -28,7 +28,7 @@ function XMLComment(parent, text) {

XMLComment.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -35,0 +35,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLDeclaration, XMLNode, create, isObject,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -13,10 +13,10 @@ create = require('lodash/object/create');

module.exports = XMLDeclaration = (function(_super) {
__extends(XMLDeclaration, _super);
module.exports = XMLDeclaration = (function(superClass) {
extend(XMLDeclaration, superClass);
function XMLDeclaration(parent, version, encoding, standalone) {
var _ref;
var ref;
XMLDeclaration.__super__.constructor.call(this, parent);
if (isObject(version)) {
_ref = version, version = _ref.version, encoding = _ref.encoding, standalone = _ref.standalone;
ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;
}

@@ -42,7 +42,7 @@ if (!version) {

XMLDeclaration.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -49,0 +49,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -25,3 +25,3 @@ var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject;

function XMLDocType(parent, pubID, sysID) {
var _ref, _ref1;
var ref, ref1;
this.documentObject = parent;

@@ -31,6 +31,6 @@ this.stringify = this.documentObject.stringify;

if (isObject(pubID)) {
_ref = pubID, pubID = _ref.pubID, sysID = _ref.sysID;
ref = pubID, pubID = ref.pubID, sysID = ref.sysID;
}
if (sysID == null) {
_ref1 = [pubID, sysID], sysID = _ref1[0], pubID = _ref1[1];
ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1];
}

@@ -114,7 +114,7 @@ if (pubID != null) {

XMLDocType.prototype.toString = function(options, level) {
var child, indent, newline, offset, pretty, r, space, _i, _len, _ref, _ref1, _ref2, _ref3;
var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space;
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';
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';
level || (level = 0);

@@ -137,5 +137,5 @@ space = new Array(level + offset + 1).join(indent);

}
_ref3 = this.children;
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
child = _ref3[_i];
ref3 = this.children;
for (i = 0, len = ref3.length; i < len; i++) {
child = ref3[i];
r += child.toString(options, level + 1);

@@ -142,0 +142,0 @@ }

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -43,7 +43,7 @@ var XMLDTDAttList, create;

XMLDTDAttList.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -50,0 +50,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -30,7 +30,7 @@ var XMLDTDElement, create, isArray;

XMLDTDElement.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -37,0 +37,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -49,7 +49,7 @@ var XMLDTDEntity, create, isObject;

XMLDTDEntity.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -56,0 +56,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -30,7 +30,7 @@ var XMLDTDNotation, create;

XMLDTDNotation.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -37,0 +37,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isArray, isFunction, isObject,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -23,4 +23,4 @@ create = require('lodash/object/create');

module.exports = XMLElement = (function(_super) {
__extends(XMLElement, _super);
module.exports = XMLElement = (function(superClass) {
extend(XMLElement, superClass);

@@ -42,15 +42,18 @@ function XMLElement(parent, name, attributes) {

XMLElement.prototype.clone = function() {
var att, attName, clonedSelf, pi, _i, _len, _ref, _ref1;
var att, attName, clonedSelf, i, len, pi, ref, ref1;
clonedSelf = create(XMLElement.prototype, this);
if (clonedSelf.isRoot) {
clonedSelf.documentObject = null;
}
clonedSelf.attributes = {};
_ref = this.attributes;
for (attName in _ref) {
if (!__hasProp.call(_ref, attName)) continue;
att = _ref[attName];
ref = this.attributes;
for (attName in ref) {
if (!hasProp.call(ref, attName)) continue;
att = ref[attName];
clonedSelf.attributes[attName] = att.clone();
}
clonedSelf.instructions = [];
_ref1 = this.instructions;
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
pi = _ref1[_i];
ref1 = this.instructions;
for (i = 0, len = ref1.length; i < len; i++) {
pi = ref1[i];
clonedSelf.instructions.push(pi.clone());

@@ -75,3 +78,3 @@ }

for (attName in name) {
if (!__hasProp.call(name, attName)) continue;
if (!hasProp.call(name, attName)) continue;
attValue = name[attName];

@@ -92,3 +95,3 @@ this.attribute(attName, attValue);

XMLElement.prototype.removeAttribute = function(name) {
var attName, _i, _len;
var attName, i, len;
if (name == null) {

@@ -99,4 +102,4 @@ throw new Error("Missing attribute name");

if (isArray(name)) {
for (_i = 0, _len = name.length; _i < _len; _i++) {
attName = name[_i];
for (i = 0, len = name.length; i < len; i++) {
attName = name[i];
delete this.attributes[attName];

@@ -111,3 +114,3 @@ }

XMLElement.prototype.instruction = function(target, value) {
var insTarget, insValue, instruction, _i, _len;
var i, insTarget, insValue, instruction, len;
if (target != null) {

@@ -120,4 +123,4 @@ target = target.valueOf();

if (isArray(target)) {
for (_i = 0, _len = target.length; _i < _len; _i++) {
insTarget = target[_i];
for (i = 0, len = target.length; i < len; i++) {
insTarget = target[i];
this.instruction(insTarget);

@@ -127,3 +130,3 @@ }

for (insTarget in target) {
if (!__hasProp.call(target, insTarget)) continue;
if (!hasProp.call(target, insTarget)) continue;
insValue = target[insTarget];

@@ -143,13 +146,13 @@ this.instruction(insTarget, insValue);

XMLElement.prototype.toString = function(options, level) {
var att, child, indent, instruction, name, newline, offset, pretty, r, space, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space;
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';
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';
level || (level = 0);
space = new Array(level + offset + 1).join(indent);
r = '';
_ref3 = this.instructions;
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
instruction = _ref3[_i];
ref3 = this.instructions;
for (i = 0, len = ref3.length; i < len; i++) {
instruction = ref3[i];
r += instruction.toString(options, level + 1);

@@ -161,6 +164,6 @@ }

r += '<' + this.name;
_ref4 = this.attributes;
for (name in _ref4) {
if (!__hasProp.call(_ref4, name)) continue;
att = _ref4[name];
ref4 = this.attributes;
for (name in ref4) {
if (!hasProp.call(ref4, name)) continue;
att = ref4[name];
r += att.toString(options);

@@ -185,5 +188,5 @@ }

}
_ref5 = this.children;
for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
child = _ref5[_j];
ref5 = this.children;
for (j = 0, len1 = ref5.length; j < len1; j++) {
child = ref5[j];
r += child.toString(options, level + 1);

@@ -190,0 +193,0 @@ }

@@ -1,5 +0,5 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isArray, isEmpty, isFunction, isObject,
__hasProp = {}.hasOwnProperty;
hasProp = {}.hasOwnProperty;

@@ -49,3 +49,3 @@ isObject = require('lodash/lang/isObject');

XMLNode.prototype.element = function(name, attributes, text) {
var item, key, lastChild, val, _i, _len, _ref;
var item, j, key, lastChild, len, ref, val;
lastChild = null;

@@ -57,3 +57,3 @@ if (attributes == null) {

if (!isObject(attributes)) {
_ref = [attributes, text], text = _ref[0], attributes = _ref[1];
ref = [attributes, text], text = ref[0], attributes = ref[1];
}

@@ -64,4 +64,4 @@ if (name != null) {

if (isArray(name)) {
for (_i = 0, _len = name.length; _i < _len; _i++) {
item = name[_i];
for (j = 0, len = name.length; j < len; j++) {
item = name[j];
lastChild = this.element(item);

@@ -73,3 +73,3 @@ }

for (key in name) {
if (!__hasProp.call(name, key)) continue;
if (!hasProp.call(name, key)) continue;
val = name[key];

@@ -141,3 +141,3 @@ if (isFunction(val)) {

XMLNode.prototype.remove = function() {
var i, _ref;
var i, ref;
if (this.isRoot) {

@@ -147,3 +147,3 @@ throw new Error("Cannot remove the root element");

i = this.parent.children.indexOf(this);
[].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref;
[].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref;
return this.parent;

@@ -153,3 +153,3 @@ };

XMLNode.prototype.node = function(name, attributes, text) {
var child, _ref;
var child, ref;
if (name != null) {

@@ -163,3 +163,3 @@ name = name.valueOf();

if (!isObject(attributes)) {
_ref = [attributes, text], text = _ref[0], attributes = _ref[1];
ref = [attributes, text], text = ref[0], attributes = ref[1];
}

@@ -166,0 +166,0 @@ child = new XMLElement(this, name, attributes);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {

@@ -24,7 +24,7 @@ var XMLProcessingInstruction, create;

XMLProcessingInstruction.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -31,0 +31,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLNode, XMLRaw, create,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -11,4 +11,4 @@ create = require('lodash/object/create');

module.exports = XMLRaw = (function(_super) {
__extends(XMLRaw, _super);
module.exports = XMLRaw = (function(superClass) {
extend(XMLRaw, superClass);

@@ -28,7 +28,7 @@ function XMLRaw(parent, text) {

XMLRaw.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -35,0 +35,0 @@ space = new Array(level + offset + 1).join(indent);

@@ -1,16 +0,16 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLStringifier,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
hasProp = {}.hasOwnProperty;
module.exports = XMLStringifier = (function() {
function XMLStringifier(options) {
this.assertLegalChar = __bind(this.assertLegalChar, this);
var key, value, _ref;
this.assertLegalChar = bind(this.assertLegalChar, this);
var key, ref, value;
this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0;
_ref = (options != null ? options.stringify : void 0) || {};
for (key in _ref) {
if (!__hasProp.call(_ref, key)) continue;
value = _ref[key];
ref = (options != null ? options.stringify : void 0) || {};
for (key in ref) {
if (!hasProp.call(ref, key)) continue;
value = ref[key];
this[key] = value;

@@ -17,0 +17,0 @@ }

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.1
(function() {
var XMLNode, XMLText, create,
__hasProp = {}.hasOwnProperty,
__extends = 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; };
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;

@@ -11,7 +11,6 @@ create = require('lodash/object/create');

module.exports = XMLText = (function(_super) {
__extends(XMLText, _super);
module.exports = XMLText = (function(superClass) {
extend(XMLText, superClass);
function XMLText(parent, text) {
this.parent = parent;
XMLText.__super__.constructor.call(this, parent);

@@ -29,7 +28,7 @@ if (text == null) {

XMLText.prototype.toString = function(options, level) {
var indent, newline, offset, pretty, r, space, _ref, _ref1, _ref2;
var indent, newline, offset, pretty, r, ref, ref1, ref2, space;
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';
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';
level || (level = 0);

@@ -36,0 +35,0 @@ space = new Array(level + offset + 1).join(indent);

{
"name": "xmlbuilder",
"version": "2.5.2",
"version": "2.6.0",
"keywords": [

@@ -28,4 +28,4 @@ "xml",

"devDependencies": {
"coffee-script": "~1.6.3",
"vows": "*"
"coffee-script": "*",
"mocha": "*"
},

@@ -35,4 +35,4 @@ "scripts": {

"postpublish": "rm -rf lib",
"test": "vows test/*"
"test": "mocha --ui tdd --reporter dot --compilers coffee:coffee-script/register --require test/common/common"
}
}

@@ -6,6 +6,7 @@ # xmlbuilder-js

[![NPM version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
[![Dependency Status](http://img.shields.io/david/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)

@@ -12,0 +13,0 @@ ### Installation:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc