UNPKG

503 BJavaScriptView Raw
1'use strict';
2
3var Node = require('./node');
4
5/**
6 * Initialize an `Each` node, representing iteration
7 *
8 * @param {String} obj
9 * @param {String} val
10 * @param {String} key
11 * @param {Block} block
12 * @api public
13 */
14
15var Each = module.exports = function Each(obj, val, key, block) {
16 this.obj = obj;
17 this.val = val;
18 this.key = key;
19 this.block = block;
20};
21
22// Inherit from `Node`.
23Each.prototype = Object.create(Node.prototype);
24Each.prototype.constructor = Each;
25
26Each.prototype.type = 'Each';