|
|
|
@ -7,6 +7,7 @@ const debug = require("debug")("promistream:last-will");
|
|
|
|
|
|
|
|
|
|
const isEndOfStream = require("@promistream/is-end-of-stream");
|
|
|
|
|
const isAborted = require("@promistream/is-aborted");
|
|
|
|
|
const propagateAbort = require("@promistream/propagate-abort");
|
|
|
|
|
|
|
|
|
|
const { validateOptions } = require("@validatem/core");
|
|
|
|
|
const isFunction = require("@validatem/is-function");
|
|
|
|
@ -79,10 +80,7 @@ module.exports = function lastWill() {
|
|
|
|
|
return {
|
|
|
|
|
_promistreamVersion: 0,
|
|
|
|
|
description: `last-will handler`,
|
|
|
|
|
abort: function abort_lastWill(source, reason) {
|
|
|
|
|
// FIXME: propagate module
|
|
|
|
|
return source.abort(reason);
|
|
|
|
|
},
|
|
|
|
|
abort: propagateAbort,
|
|
|
|
|
peek: function peek_lastWill(source) {
|
|
|
|
|
return Promise.try(() => {
|
|
|
|
|
return pauser.await();
|
|
|
|
|