aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jade/lib/nodes/block.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-27 17:36:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-27 17:36:13 +0200
commit5f466137ad6ac596600e3ff53c9b786815398445 (patch)
treef914c221874f0b16bf3def7ac01d59d1a99a3b0b /node_modules/jade/lib/nodes/block.js
parentc9f5ac8e763eda19aa0564179300cfff76785435 (diff)
node_modules, clean up package.json
Diffstat (limited to 'node_modules/jade/lib/nodes/block.js')
-rw-r--r--node_modules/jade/lib/nodes/block.js121
1 files changed, 0 insertions, 121 deletions
diff --git a/node_modules/jade/lib/nodes/block.js b/node_modules/jade/lib/nodes/block.js
deleted file mode 100644
index bb00a1d9b..000000000
--- a/node_modules/jade/lib/nodes/block.js
+++ /dev/null
@@ -1,121 +0,0 @@
-
-/*!
- * Jade - nodes - Block
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var Node = require('./node');
-
-/**
- * Initialize a new `Block` with an optional `node`.
- *
- * @param {Node} node
- * @api public
- */
-
-var Block = module.exports = function Block(node){
- this.nodes = [];
- if (node) this.push(node);
-};
-
-/**
- * Inherit from `Node`.
- */
-
-Block.prototype.__proto__ = Node.prototype;
-
-/**
- * Block flag.
- */
-
-Block.prototype.isBlock = true;
-
-/**
- * Replace the nodes in `other` with the nodes
- * in `this` block.
- *
- * @param {Block} other
- * @api private
- */
-
-Block.prototype.replace = function(other){
- other.nodes = this.nodes;
-};
-
-/**
- * Pust the given `node`.
- *
- * @param {Node} node
- * @return {Number}
- * @api public
- */
-
-Block.prototype.push = function(node){
- return this.nodes.push(node);
-};
-
-/**
- * Check if this block is empty.
- *
- * @return {Boolean}
- * @api public
- */
-
-Block.prototype.isEmpty = function(){
- return 0 == this.nodes.length;
-};
-
-/**
- * Unshift the given `node`.
- *
- * @param {Node} node
- * @return {Number}
- * @api public
- */
-
-Block.prototype.unshift = function(node){
- return this.nodes.unshift(node);
-};
-
-/**
- * Return the "last" block, or the first `yield` node.
- *
- * @return {Block}
- * @api private
- */
-
-Block.prototype.includeBlock = function(){
- var ret = this
- , node;
-
- for (var i = 0, len = this.nodes.length; i < len; ++i) {
- node = this.nodes[i];
- if (node.yield) return node;
- else if (node.textOnly) continue;
- else if (node.includeBlock) ret = node.includeBlock();
- else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock();
- }
-
- return ret;
-};
-
-/**
- * Return a clone of this block.
- *
- * @return {Block}
- * @api private
- */
-
-Block.prototype.clone = function(){
- var clone = new Block;
- for (var i = 0, len = this.nodes.length; i < len; ++i) {
- clone.push(this.nodes[i].clone());
- }
- return clone;
-};
-