@promistream/propagate-abort
v0.1.7
Published
A simple abort handler for [Promistreams](https://promistream.cryto.net/) that just passes on an incoming abort notification to the direct upstream.
Downloads
6
Readme
@promistream/propagate-abort
A simple abort handler for Promistreams that just passes on an incoming abort notification to the direct upstream.
Example:
"use strict";
const propagateAbort = require("@promistream/propagate-abort");
const propagatePeek = require("@promistream/propagate-peek");
module.exports = function makeStream() {
return {
description: `pass-through stream`,
read: (source) => {
/* This example stream just passes through the upstream value */
return source.read();
},
abort: propagateAbort,
peek: propagatePeek
}
};