Add documentation, fix initial version
parent
9d7c33355e
commit
1cae3d817c
@ -0,0 +1,22 @@
|
||||
# @ppstreams/propagate-abort
|
||||
|
||||
A simple abort handler for ppstreams that just passes on an incoming abort notification to the source stream.
|
||||
|
||||
## Example:
|
||||
|
||||
```js
|
||||
"use strict";
|
||||
|
||||
const propagateAbort = require("@ppstreams/propagate-abort");
|
||||
|
||||
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
|
||||
}
|
||||
};
|
||||
```
|
Loading…
Reference in New Issue