Valv - A super small async flow control library
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
valv.js
valv.tiny.js

README.md

Valv - A super-small async flow control library

Valv is a tiny library that makes stepping async code much easier.

How to Use

It's as easy as it could possibly be. You run this() to run the next step. If you've used the famous Step framework, you already know how to use this. Valv really brings nothing new to the table besides size and performance (Step uses a try/catch).

valv(
  function() {
    //Step 1
    setTimeout(this, 100);
  },
  function() {
    this('Hello'); //You can pass as many arguments to the next function as you'd like
  },
  function(arg) {
    console.log(arg); //Will log 'Hello'
  }
);