1.0.0 • Published 9 years ago

pflow v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

pflow

Create flow of promised functions. Same as lodash.flow but handles promises.

Installation

npm install pflow

Usage

var Promise = require('bluebird');
var flow = require('pflow');

function inc (x) {
	return Promise.resolve(x + 1);
}

var inc3 = flow(inc, inc, inc);

inc3(0).then(function (x) {
	console.log(x); // 3
});