No Description

Sven Slootweg d0b5a86a86 Initial commit 6 months ago
.gitignore d0b5a86a86 Initial commit 6 months ago
README.md d0b5a86a86 Initial commit 6 months ago
index.js d0b5a86a86 Initial commit 6 months ago
package.json d0b5a86a86 Initial commit 6 months ago

README.md

@ppstreams/propagate-peek

A simple peek handler for ppstreams that just passes on an incoming peek request 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
    }
};