35 lines
564 B
JavaScript
35 lines
564 B
JavaScript
|
|
/*!
|
|
* Jade - nodes - Each
|
|
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
|
|
* MIT Licensed
|
|
*/
|
|
|
|
/**
|
|
* Module dependencies.
|
|
*/
|
|
|
|
var Node = require('./node');
|
|
|
|
/**
|
|
* Initialize an `Each` node, representing iteration
|
|
*
|
|
* @param {String} obj
|
|
* @param {String} val
|
|
* @param {String} key
|
|
* @param {Block} block
|
|
* @api public
|
|
*/
|
|
|
|
var Each = module.exports = function Each(obj, val, key, block) {
|
|
this.obj = obj;
|
|
this.val = val;
|
|
this.key = key;
|
|
this.block = block;
|
|
};
|
|
|
|
/**
|
|
* Inherit from `Node`.
|
|
*/
|
|
|
|
Each.prototype.__proto__ = Node.prototype; |