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