Import upstream version 1.1.2+git20160430.707f590, md5 99996fcf8464ae83cc11bc40dc692257
Debian Janitor
5 years ago
27 | 27 | The result of [require][13] is a 'function()' that when invoked, will return a |
28 | 28 | [Readable][11] [Stream][12]. |
29 | 29 | |
30 | ``` | |
30 | ```js | |
31 | 31 | var streamify = require('stream-array'); |
32 | 32 | ``` |
33 | 33 | |
35 | 35 | stream can handle it. Each element in the array will be [pushed][14] into the |
36 | 36 | [piped][15] stream, **without** modifying the source array. |
37 | 37 | |
38 | ``` | |
38 | ```js | |
39 | 39 | var readable = streamify(['Hello', new Buffer('World')]); |
40 | 40 | ``` |
41 | 41 | |
42 | 42 | This [Stream][12] will [push][14] each element of the source array into the |
43 | 43 | [piped][15] array. |
44 | 44 | |
45 | ``` | |
45 | ```js | |
46 | 46 | readable(['1', '2', '3', os.EOL]).pipe(process.stdout); |
47 | 47 | ``` |
48 | 48 |