Sin descripción

taskTree.js 256B

1234567891011121314
  1. 'use strict';
  2. module.exports = function(tasks) {
  3. return Object.keys(tasks)
  4. .reduce(function(prev, task) {
  5. prev.nodes.push({
  6. label: task,
  7. nodes: tasks[task].dep,
  8. });
  9. return prev;
  10. }, {
  11. nodes: [],
  12. });
  13. };