0.0.4 • Published 10 years ago

flowman v0.0.4

Weekly downloads
15
License
-
Repository
github
Last release
10 years ago

Flowman

A lightweight (25 SLOC) async flow control to convert your callbacks to promise

Installation

$ npm install flowman

Usage

var flow = require('flowman');

var combine = flow.sequential(
    function(input, next){
        setTimeout(function(){
            next(null, input.first, input.family);
        }, 5);
    },
    function(first, family, next){
        setTimeout(function(){
            next(null, first + ', ' + family);
        }, 5);
    });

combine({first:'Ling', family:'Chang'}).done(function(name){
    name.should.equal('Ling, Chang');
});
0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago