This commit is contained in:
rkiel
2019-07-18 15:40:37 -04:00
parent 48d64da20b
commit 308d62fc86
7 changed files with 90 additions and 86 deletions

View File

@@ -23,10 +23,24 @@ function something(cmd, dp) {
return lib.run(cmd).then(lib._something(dp));
}
function pipeline(cmds) {
return _.reduce(
cmds,
(accum, elem) => {
return accum
.then(() => console.log())
.then(() => console.log(elem))
.then(() => exec(elem));
},
Promise.resolve({})
).then(() => console.log());
}
lib = {
_something,
run,
capture,
pipeline,
something: _.curry(something)
};