Add peek method

master
Sven Slootweg 6 years ago
parent 858f393a7a
commit 9f11eb44fc

@ -2,12 +2,14 @@
const Promise = require("bluebird");
const propagateAbort = require("@ppstreams/propagate-abort");
const propagatePeek = require("@ppstreams/propagate-peek");
const { isEndOfStream } = require("@ppstreams/end-of-stream-marker");
module.exports = function greedySinkStream(description, callback) {
return {
description: `greedy sink stream (${description})`,
abort: propagateAbort,
peek: propagatePeek,
read: function produceValue_greedySinkStream(source) {
let lastResult;

@ -7,6 +7,7 @@
"license": "WTFPL OR CC0-1.0",
"dependencies": {
"@ppstreams/propagate-abort": "^0.1.2",
"@ppstreams/propagate-peek": "^0.1.0",
"bluebird": "^3.5.4"
}
}

Loading…
Cancel
Save