Browse Source

Update documentation

Sven Slootweg 3 months ago
parent
commit
4890ec1a60
1 changed files with 4 additions and 2 deletions
  1. 4 2
      README.md

+ 4 - 2
README.md

@ -1,6 +1,6 @@
1 1
# @ppstreams/propagate-abort
2 2
3
A simple abort handler for ppstreams that just passes on an incoming abort notification to the source stream.
3
A simple abort handler for ppstreams that just passes on an incoming abort notification to the direct upstream.
4 4
5 5
## Example:
6 6
@ -8,6 +8,7 @@ A simple abort handler for ppstreams that just passes on an incoming abort notif
8 8
"use strict";
9 9
10 10
const propagateAbort = require("@ppstreams/propagate-abort");
11
const propagatePeek = require("@ppstreams/propagate-peek");
11 12
12 13
module.exports = function makeStream() {
13 14
	return {
@ -16,7 +17,8 @@ module.exports = function makeStream() {
16 17
			/* This example stream just passes through the upstream value */
17 18
			return source.read();
18 19
		},
19
		abort: propagateAbort
20
		abort: propagateAbort,
21
		peek: propagatePeek
20 22
	}
21 23
};
22 24
```