chainbuilder-flow
Flow block (each, map, if, while) mixins for chainbuilder.
Installation npm install chainbuilder chainbuilder-flow --save
Usage
var chainBuilder = ; var myChain = ;
Methods
#$beginMap(options), #$endMap()
Begin and end a map block. The map will be made in parallel by default.
e.g.
;
@param {Object} options
(optional) flow control options.
@param {Boolean} options.series
(optional) run the block in series (one at a time).
@param {Number} options.limit
(optional) limit to running n items in parallel at a time.
@alias #$beginEach(options), #$endEach()
#$beginIf(conditionFn), #$endIf()
Begin and end a conditional block.
e.g.
@param {function(result):boolean} conditionFn
block will run if true
is returned.
#$beginWhile(checkFn), #$endWhile()
Begin and end a block that is executed while the condition is true.
e.g.
@param {function(result):boolean} conditionFn
block will run while true
is returned.