You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andrea Gaertner 668e16c315 Einkaufsliste application_liste hinzugefügt 3 years ago
..
LICENSE Einkaufsliste application_liste hinzugefügt 3 years ago
README.md Einkaufsliste application_liste hinzugefügt 3 years ago
index.js Einkaufsliste application_liste hinzugefügt 3 years ago
package.json Einkaufsliste application_liste hinzugefügt 3 years ago

README.md

to-through

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Wrap a ReadableStream in a TransformStream.

Usage

var from = require('from2');
var concat = require('concat-stream');
var toThrough = require('to-through');

var readable = from([' ', 'hello', ' ', 'world']);

// Can be used as a Readable or Transform
var maybeTransform = toThrough(readable);

from(['hi', ' ', 'there', ','])
  .pipe(maybeTransform)
  .pipe(concat(function(result) {
    // result.toString() === 'hi there, hello world'
  }));

API

toThrough(readableStream)

Takes a readableStream as the only argument and returns a through2 stream. If the returned stream is piped before nextTick, the wrapped readableStream will not flow until the upstream is flushed. If the stream is not piped before nextTick, it is ended and flushed (acting as a proper readable).

License

MIT