diff --git a/README.md b/README.md new file mode 100644 index 0000000..9af685c --- /dev/null +++ b/README.md @@ -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 + } +}; +``` \ No newline at end of file diff --git a/package.json b/package.json index 95c5892..eb021ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ppstreams/propagate-abort", - "version": "1.0.0", + "version": "0.1.0", "main": "index.js", "repository": "git@git.cryto.net:joepie91/ppstreams-propagate-abort.git", "author": "Sven Slootweg ",