Browse Source

Add peek method

master
Sven Slootweg 1 year ago
parent
commit
9f11eb44fc
2 changed files with 3 additions and 0 deletions
  1. +2
    -0
      index.js
  2. +1
    -0
      package.json

+ 2
- 0
index.js View File

@@ -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;



+ 1
- 0
package.json View File

@@ -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