1.1.2 • Published 8 years ago

stream-array v1.1.2

Weekly downloads
110,342
License
MIT
Repository
github
Last release
8 years ago

stream-array

Pipe an Array through Node.js Streams. This is rather useful for testing other streams.

npm version build status dependencies devDependencies Inch CI

//: testling

Usage

var streamify = require('stream-array'),
    os = require('os');

streamify(['1', '2', '3', os.EOL]).pipe(process.stdout);

API

streamify(Array)

The result of require is a 'function()' that when invoked, will return a Readable Stream.

var streamify = require('stream-array');

The source array can contain any type as it is assumed that the receiving stream can handle it. Each element in the array will be pushed into the piped stream, without modifying the source array.

var readable = streamify(['Hello', new Buffer('World')]);

This Stream will push each element of the source array into the piped array.

readable(['1', '2', '3', os.EOL]).pipe(process.stdout);
123\n

Install

npm install stream-array

License

MIT License

1.1.2

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago