xmlbuilder
Advanced tools
Comparing version 2.1.0 to 2.2.1
@@ -1,6 +0,6 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLBuilder, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -7,0 +7,0 @@ XMLBuilder = require('./XMLBuilder'); |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLAttribute, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLAttribute = (function() { | ||
function XMLAttribute(parent, name, value) { | ||
@@ -21,2 +20,6 @@ this.stringify = parent.stringify; | ||
XMLAttribute.prototype.clone = function() { | ||
return _.create(XMLAttribute.prototype, this); | ||
}; | ||
XMLAttribute.prototype.toString = function(options, level) { | ||
@@ -23,0 +26,0 @@ return ' ' + this.name + '="' + this.value + '"'; |
@@ -1,6 +0,6 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -16,3 +16,2 @@ XMLStringifier = require('./XMLStringifier'); | ||
module.exports = XMLBuilder = (function() { | ||
function XMLBuilder(name, options) { | ||
@@ -19,0 +18,0 @@ var root, temp; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLCData, XMLNode, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -13,3 +13,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLCData = (function(_super) { | ||
__extends(XMLCData, _super); | ||
@@ -25,2 +24,6 @@ | ||
XMLCData.prototype.clone = function() { | ||
return _.create(XMLCData.prototype, this); | ||
}; | ||
XMLCData.prototype.toString = function(options, level) { | ||
@@ -27,0 +30,0 @@ var indent, newline, pretty, r, space; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLComment, XMLNode, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -13,3 +13,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLComment = (function(_super) { | ||
__extends(XMLComment, _super); | ||
@@ -25,2 +24,6 @@ | ||
XMLComment.prototype.clone = function() { | ||
return _.create(XMLComment.prototype, this); | ||
}; | ||
XMLComment.prototype.toString = function(options, level) { | ||
@@ -27,0 +30,0 @@ var indent, newline, pretty, r, space; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLDeclaration, XMLNode, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -13,3 +13,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLDeclaration = (function(_super) { | ||
__extends(XMLDeclaration, _super); | ||
@@ -37,2 +36,6 @@ | ||
XMLDeclaration.prototype.clone = function() { | ||
return _.create(XMLDeclaration.prototype, this); | ||
}; | ||
XMLDeclaration.prototype.toString = function(options, level) { | ||
@@ -39,0 +42,0 @@ var indent, newline, pretty, r, space; |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLDocType, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLDocType = (function() { | ||
function XMLDocType(parent, pubID, sysID) { | ||
@@ -28,2 +27,6 @@ var _ref, _ref1; | ||
XMLDocType.prototype.clone = function() { | ||
return _.create(XMLDocType.prototype, this); | ||
}; | ||
XMLDocType.prototype.element = function(name, value) { | ||
@@ -30,0 +33,0 @@ var XMLDTDElement, child; |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLDTDAttList, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLDTDAttList = (function() { | ||
function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { | ||
@@ -39,2 +38,6 @@ this.stringify = parent.stringify; | ||
XMLDTDAttList.prototype.clone = function() { | ||
return _.create(XMLDTDAttList.prototype, this); | ||
}; | ||
XMLDTDAttList.prototype.toString = function(options, level) { | ||
@@ -41,0 +44,0 @@ var indent, newline, pretty, r, space; |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLDTDElement, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLDTDElement = (function() { | ||
function XMLDTDElement(parent, name, value) { | ||
@@ -24,2 +23,6 @@ this.stringify = parent.stringify; | ||
XMLDTDElement.prototype.clone = function() { | ||
return _.create(XMLDTDElement.prototype, this); | ||
}; | ||
XMLDTDElement.prototype.toString = function(options, level) { | ||
@@ -26,0 +29,0 @@ var indent, newline, pretty, r, space; |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLDTDEntity, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLDTDEntity = (function() { | ||
function XMLDTDEntity(parent, pe, name, value) { | ||
@@ -43,2 +42,6 @@ this.stringify = parent.stringify; | ||
XMLDTDEntity.prototype.clone = function() { | ||
return _.create(XMLDTDEntity.prototype, this); | ||
}; | ||
XMLDTDEntity.prototype.toString = function(options, level) { | ||
@@ -45,0 +48,0 @@ var indent, newline, pretty, r, space; |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLDTDNotation, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLDTDNotation = (function() { | ||
function XMLDTDNotation(parent, name, value) { | ||
@@ -26,2 +25,6 @@ this.stringify = parent.stringify; | ||
XMLDTDNotation.prototype.clone = function() { | ||
return _.create(XMLDTDNotation.prototype, this); | ||
}; | ||
XMLDTDNotation.prototype.toString = function(options, level) { | ||
@@ -28,0 +31,0 @@ var indent, newline, pretty, r, space; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -17,3 +17,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLElement = (function(_super) { | ||
__extends(XMLElement, _super); | ||
@@ -35,5 +34,5 @@ | ||
XMLElement.prototype.clone = function(deep) { | ||
XMLElement.prototype.clone = function() { | ||
var att, attName, clonedSelf, pi, _i, _len, _ref, _ref1; | ||
clonedSelf = _.clone(this); | ||
clonedSelf = _.create(XMLElement.prototype, this); | ||
clonedSelf.attributes = {}; | ||
@@ -44,3 +43,3 @@ _ref = this.attributes; | ||
att = _ref[attName]; | ||
clonedSelf.attributes[attName] = _.clone(att); | ||
clonedSelf.attributes[attName] = att.clone(); | ||
} | ||
@@ -51,13 +50,11 @@ clonedSelf.instructions = []; | ||
pi = _ref1[_i]; | ||
clonedSelf.instructions.push(_.clone(pi)); | ||
clonedSelf.instructions.push(pi.clone()); | ||
} | ||
clonedSelf.children = []; | ||
if (deep) { | ||
this.children.forEach(function(child) { | ||
var clonedChild; | ||
clonedChild = child.clone(deep); | ||
clonedChild.parent = clonedSelf; | ||
return clonedSelf.children.push(clonedChild); | ||
}); | ||
} | ||
this.children.forEach(function(child) { | ||
var clonedChild; | ||
clonedChild = child.clone(); | ||
clonedChild.parent = clonedSelf; | ||
return clonedSelf.children.push(clonedChild); | ||
}); | ||
return clonedSelf; | ||
@@ -64,0 +61,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -6,6 +6,5 @@ var XMLNode, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLNode = (function() { | ||
function XMLNode(parent) { | ||
@@ -17,2 +16,6 @@ this.parent = parent; | ||
XMLNode.prototype.clone = function() { | ||
throw new Error("Cannot clone generic XMLNode"); | ||
}; | ||
XMLNode.prototype.element = function(name, attributes, text) { | ||
@@ -232,13 +235,9 @@ var item, key, lastChild, val, _i, _len, _ref; | ||
var clonedRoot; | ||
clonedRoot = xmlbuilder.root().clone(true); | ||
clonedRoot = xmlbuilder.root().clone(); | ||
clonedRoot.parent = this; | ||
clonedRoot.isRoot = false; | ||
this.children.push(clonedRoot); | ||
clonedRoot.isRoot = false; | ||
return this; | ||
}; | ||
XMLNode.prototype.clone = function(deep) { | ||
return _.clone(this); | ||
}; | ||
XMLNode.prototype.ele = function(name, attributes, text) { | ||
@@ -245,0 +244,0 @@ return this.element(name, attributes, text); |
@@ -1,9 +0,8 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLProcessingInstruction, _; | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
module.exports = XMLProcessingInstruction = (function() { | ||
function XMLProcessingInstruction(parent, target, value) { | ||
@@ -20,2 +19,6 @@ this.stringify = parent.stringify; | ||
XMLProcessingInstruction.prototype.clone = function() { | ||
return _.create(XMLProcessingInstruction.prototype, this); | ||
}; | ||
XMLProcessingInstruction.prototype.toString = function(options, level) { | ||
@@ -22,0 +25,0 @@ var indent, newline, pretty, r, space; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLNode, XMLRaw, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -13,3 +13,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLRaw = (function(_super) { | ||
__extends(XMLRaw, _super); | ||
@@ -25,2 +24,6 @@ | ||
XMLRaw.prototype.clone = function() { | ||
return _.create(XMLRaw.prototype, this); | ||
}; | ||
XMLRaw.prototype.toString = function(options, level) { | ||
@@ -27,0 +30,0 @@ var indent, newline, pretty, r, space; |
@@ -1,15 +0,11 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var XMLStringifier, | ||
_this = this, | ||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
__hasProp = {}.hasOwnProperty; | ||
module.exports = XMLStringifier = (function() { | ||
function XMLStringifier(options) { | ||
var key, value, _ref, | ||
_this = this; | ||
this.assertLegalChar = function(str) { | ||
return XMLStringifier.prototype.assertLegalChar.apply(_this, arguments); | ||
}; | ||
this.assertLegalChar = __bind(this.assertLegalChar, this); | ||
var key, value, _ref; | ||
this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; | ||
@@ -16,0 +12,0 @@ _ref = (options != null ? options.stringify : void 0) || {}; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.1 | ||
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
@@ -7,3 +7,3 @@ var XMLNode, XMLText, _, | ||
_ = require('underscore'); | ||
_ = require('lodash-node'); | ||
@@ -13,3 +13,2 @@ XMLNode = require('./XMLNode'); | ||
module.exports = XMLText = (function(_super) { | ||
__extends(XMLText, _super); | ||
@@ -26,2 +25,6 @@ | ||
XMLText.prototype.clone = function() { | ||
return _.create(XMLText.prototype, this); | ||
}; | ||
XMLText.prototype.toString = function(options, level) { | ||
@@ -28,0 +31,0 @@ var indent, newline, pretty, r, space; |
{ | ||
"name": "xmlbuilder", | ||
"version": "2.1.0", | ||
"keywords": [ "xml", "xmlbuilder" ], | ||
"version": "2.2.1", | ||
"keywords": [ | ||
"xml", | ||
"xmlbuilder" | ||
], | ||
"homepage": "http://github.com/oozcitak/xmlbuilder-js", | ||
@@ -23,11 +26,11 @@ "description": "An XML builder for node.js", | ||
"engines": { | ||
"node": ">=0.2.0" | ||
"node": "0.8.x || 0.10.x" | ||
}, | ||
"dependencies": { | ||
"underscore": ">=1.5.x" | ||
"lodash-node": "~2.4.1" | ||
}, | ||
"devDependencies": { | ||
"coffee-script": ">=1.1.x", | ||
"vows": ">=0.7.x", | ||
"memwatch": ">=0.2.x" | ||
"coffee-script": "~1.6.3", | ||
"vows": "*", | ||
"memwatch": "*" | ||
}, | ||
@@ -40,2 +43,1 @@ "scripts": { | ||
} | ||
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
49939
1314
+ Addedlodash-node@~2.4.1
+ Addedlodash-node@2.4.1(transitive)
- Removedunderscore@>=1.5.x
- Removedunderscore@1.13.7(transitive)