UNPKG

lumenize

Version:

Illuminating the forest AND the trees in your data.

51 lines (43 loc) 1.44 kB
// Generated by CoffeeScript 1.7.1 (function() { var DataFlow, utils; utils = require('tztime').utils; DataFlow = (function() { function DataFlow(userConfig, callback) { var c, _i, _len, _ref; this.userConfig = userConfig; this.callback = callback; this.config = utils.clone(this.userConfig); _ref = this.config; for (_i = 0, _len = _ref.length; _i < _len; _i++) { c = _ref[_i]; c.allDependencies = []; if (c.parameters != null) { DataFlow._addDependencies(c.allDependencies, c.parameters); } if (c.triggerParameters != null) { DataFlow._addDependencies(c.allDependencies, c.triggerParameters); } if (c.addDataParameters != null) { DataFlow._addDependencies(c.allDependencies, c.c.addDataParameters); } } } DataFlow._addDependencies = function(dependencies, parameters) { var dependency, p, _i, _len, _results; _results = []; for (_i = 0, _len = parameters.length; _i < _len; _i++) { p = parameters[_i]; if (utils.type(p) === 'string' && utils.startsWith(p, '@')) { dependency = p.split('.')[0].substring(1); _results.push(dependencies.push(dependency)); } else { _results.push(void 0); } } return _results; }; return DataFlow; })(); exports.DataFlow = DataFlow; }).call(this);