stream-array
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

stream-array

Pipe an Array through Node.js streams

1.1.2  •  Published 4 years ago  •  by Matthew Metnetsky  •  MIT License

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

npm version build status dependencies devDependencies Inch CI

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

How do you feel about the name Devstore for this site?

Popularity

Weekly Downloads
83.3K
Stars
33

Maintenance

Development

Last ver 4 years ago
Created 7 years ago
Last commit 4 years ago
11 days between commits

Technology

Node version: 6.0.0
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

3 contributors
Matthew Metnetsky
Maintainer, 95 commits, 2 merges
Works at Konica Minolta Business Solutions U.S.A., Inc
Fabrício Matté
2 commits, 1 PRs
Works at BairesDev
Vladimir Starkov
2 commits
iamstarkov
1 PRs
timkuijsten
1 PRs
greenkeeper
1 PRs

Tags

array
readable
stream
pipe
Ready for the next level?
Join Devstore's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
© 2019 Devstore, Inc.
Devstore helps developers find and use open-source packages, so they can focus on building amazing things