Skip to content

stagas/vomit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vomit

control flow callback<->promise magic helper

example

var math = {};

math.sum = function (a, b, cb) { cb(null, a+b); };
math.mul = function (a, b, cb) { cb(null, a*b); };

vomit(math, function (sum, mul) {
  return mul(sum(1, sum(2,2)), 3);
}, function(err, result){
  console.log(result); // 15
});

License

MIT

About

control flow callback<->promise magic helper

Resources

Stars

Watchers

Forks

Packages

No packages published