0.1.0 • Published 10 years ago

stream-from v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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.