Tim Caswell’s Step is a lightweight library. In fact, its API consists of a single function: Step.
Step takes a list of functions; here’s an example:
Step(task1, task2, task3);
Each function can control the flow in three ways.
It can call this to make Step run the next function in the list.
It can call a callback generated by this.parallel or this.group n times to tell Step to run the next function n times.
It can return a value, which will also make Step run the next function in the list. This makes it easy to mix synchronous functions with async ones.
The next function will receive the results of its predecessor (that is, its return value or the arguments it passed to this) or the results of all ...