stream-from

0.1.0 • Public • Published

stream-from Dependencies Status Image Build Status Image

Create streams from promises, iterators, factories and arbitrary Javascript values like functions, arrays, etc.

npm install stream-from --save

This is a simple facade for:

var streamFrom = require('stream-from');
 
/* stream-from-array */
streamFrom.array(['foo', 'bar']).pipe(process.stdout); // output: foobar
streamFrom.array.obj(...).pipe(...);
 
/* stream-from-factory */
streamFrom.factory(...).pipe(...);
streamFrom.factory.obj(...).pipe(...);
 
/* stream-from-iterator */
streamFrom.iterator(...).pipe(...);
streamFrom.iterator.obj(...).pipe(...);
 
/* stream-from-promise */
streamFrom.promise(...).pipe(...);
streamFrom.promise.obj(...).pipe(...);
 
/* stream-from-value */
streamFrom.value(...).pipe(...);
streamFrom.value.obj(...).pipe(...);

License

Copyright (c) 2014 Michael Mayer

Licensed under the MIT license.

Package Sidebar

Install

npm i stream-from

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • schnittstabil