@promistream/propagate-peek

0.1.1 • Public • Published

@promistream/propagate-peek

A simple peek handler for Promistreams that just passes on an incoming peek request to the direct upstream.

Example:

"use strict";

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

Readme

Keywords

none

Package Sidebar

Install

npm i @promistream/propagate-peek

Weekly Downloads

0

Version

0.1.1

License

WTFPL OR CC0-1.0

Unpacked Size

930 B

Total Files

3

Last publish

Collaborators

  • joepie91