Update implementation to new simple-sink API

This commit is contained in:
Sven Slootweg 2021-03-02 12:33:24 +01:00
parent 402cfcb457
commit 3ccc2d5ed9

View file

@ -5,9 +5,12 @@ const simpleSink = require("@ppstreams/simple-sink");
module.exports = function collect() {
let results = [];
return simpleSink((value) => {
results.push(value);
return results;
return simpleSink({
onResult: (value) => {
results.push(value);
},
onEnd: () => {
return results;
}
});
};