You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sven Slootweg 0087c43f85 | 4 years ago | |
---|---|---|
.gitignore | 6 years ago | |
README.md | 4 years ago | |
index.js | 6 years ago | |
package.json | 4 years ago |
README.md
@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
}
};