A very simple data queue processing library.
BatchFlow didn't cut it because I needed to keep batch processing a data set.
Do not confuse this (qflow
) with the great library queue-flow by David Ellis. queue-flow
does much more and very powerful, you should check it out. I wanted something simpler for my needs. I unfortunatley chose the name qflow
after queue-flow
was already taken. I did this because I wanted to keep a cohesive naming scheme with my other flow
libraries: NextFlow, BatchFlow, and TriggerFlow.
npm install qflow
Super simple example:
var results = []
qflow([1,2,3,4])
.deq(function(val, next) {
results.push(val * 2)
next()
})
.on('empty', function() {
console.dir(results) //[2,4,6,8]
})
.start(1) //essentially process sequentially.
Todo. In the meantime, use the source Luke.
(MIT License)
Copyright 2012, JP Richardson jprichardson@gmail.com