runq

1.1.2 • Public • Published

runq

Run a queue of functions sequentially.

Install

npm install runq

Usage

runq = require("runq");

runq()
.add(function(cb, a) {
	cb(null, a + 1);
})
.add(function(cb, a) {
	cb(null, a + 1);
})
.run(function(err, r) {
	// all done
	if(err) {
		// ...
	}
	else {
		console.log(a);		// 3
	}
}, 1)

Readme

Keywords

none

Package Sidebar

Install

npm i runq

Weekly Downloads

726

Version

1.1.2

License

MIT

Last publish

Collaborators

  • sleeplessinc