Update implementation to new simple-sink API
This commit is contained in:
parent
402cfcb457
commit
3ccc2d5ed9
11
index.js
11
index.js
|
@ -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;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue