Update documentation

master
Sven Slootweg 5 years ago
parent 1e16264eff
commit 4890ec1a60

@ -1,6 +1,6 @@
# @ppstreams/propagate-abort # @ppstreams/propagate-abort
A simple abort handler for ppstreams that just passes on an incoming abort notification to the source stream. A simple abort handler for ppstreams that just passes on an incoming abort notification to the direct upstream.
## Example: ## Example:
@ -8,6 +8,7 @@ A simple abort handler for ppstreams that just passes on an incoming abort notif
"use strict"; "use strict";
const propagateAbort = require("@ppstreams/propagate-abort"); const propagateAbort = require("@ppstreams/propagate-abort");
const propagatePeek = require("@ppstreams/propagate-peek");
module.exports = function makeStream() { module.exports = function makeStream() {
return { return {
@ -16,7 +17,8 @@ module.exports = function makeStream() {
/* This example stream just passes through the upstream value */ /* This example stream just passes through the upstream value */
return source.read(); return source.read();
}, },
abort: propagateAbort abort: propagateAbort,
peek: propagatePeek
} }
}; };
``` ```
Loading…
Cancel
Save