pull-array-collate
v0.1.0
Published
Collate array objects and send them downstream.
Downloads
3
Readme
pull-array-collate
Collate arrays and send them downstream.
This pull-stream
is combination of a Sink and a Through. It will sink all the objects from upstream, once upstream
reached it's end, it'll send downstream an array.
Example
var pull = require("pull-stream");
var arrCollateStream = require("pull-array-collate");
function plusOneMapper(num) {
return num+1;
}
pull(
pull.values([1,2,3,4]),
pull.map(plusOneMapper),
arrCollateStream(),
pull.drain(console.log)
)
Result:
[ 2, 3, 4, 5 ]
install
With npm do:
npm install pull-array-collate
license
MIT