Skip to content
/ flow.js Public
forked from it-ony/flow.js

synchron, asynchron control flow javascript library

License

Notifications You must be signed in to change notification settings

krebbl/flow.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flow.js

Introduction

flow.js is a synchron-asynchron flow control library which runs on node and in browsers. The functionallity of the library is inspired by node-seq (https://github.com/substack/node-seq) and async (https://github.com/caolan/async). The source is written from scratch.

Development

flow.js is currently in an early state.

Features

  • sequence flow
  • parallel flow

Usage

Create a flow and execute

    flow()
       .exec(function (err, results) {
            if (err) {
                // some error inside the flow
            } else {
                // access to results
            }
       });

Add a sequence

execute synchron method in sequence

    flow()
       .seq(function(){
           // do something synchron
       })
       .exec(function (err, results) {           
       });

execute synchron method in sequence

    flow()
       .seq(function(cb){
           // do something asynchron
           setTimeout(function(){
                // invoke callback
                cb(null, "result of this sequence");
           }, 1000);
       })
       .exec(function (err, results) {           
       });

About

synchron, asynchron control flow javascript library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published