A syntax wrapper for async.series that lets you cleanly run a series of callbacks.
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.
test
.gitignore
README.md
package.json
run-cb.js

README.md

run-cb

A syntax wrapper for async.series that lets you cleanly run a series of callbacks.

Background

It's often necessary in JavaScript to run asynchronous functions serially. The async module allows a way of doing this, but it requires the use of anonymous callbacks wrapping the function. The goal of run-cb is to wrap async.series in such a way that such modifications are unnecessary.

Usage:

var run = require('run-cb');

run(myCallback, myOtherCallback, myThirdCallback);

No wrangling []s or {}s, and no additional callbacks required for flow control – all of that is hidden by run-cb.