From 9f11eb44fc7a8f7bc2597c786c0842d4010dd477 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 4 May 2019 22:03:10 +0200 Subject: [PATCH] Add peek method --- index.js | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/index.js b/index.js index 581a4fa..0e6e5f3 100644 --- a/index.js +++ b/index.js @@ -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; diff --git a/package.json b/package.json index a480dcf..404d487 100644 --- a/package.json +++ b/package.json @@ -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" } }