stream-from
v0.1.0
Published
Create streams from promises, iterators, factories and arbitrary Javascript values like functions, arrays, etc.
Downloads
3
Maintainers
Readme
stream-from
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.