No Description

Sven Slootweg 82799481d2 0.1.3 5 months ago
.gitignore 2d768a5d07 Initial commit 6 months ago
README.md 4890ec1a60 Update documentation 5 months ago
index.js 2d768a5d07 Initial commit 6 months ago
package.json 82799481d2 0.1.3 5 months ago

README.md

@ppstreams/propagate-abort

A simple abort handler for ppstreams that just passes on an incoming abort notification to the direct upstream.

Example:

"use strict";

const propagateAbort = require("@ppstreams/propagate-abort");
const propagatePeek = require("@ppstreams/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
    }
};