How to use the pipeline function from event-stream
Find comprehensive JavaScript event-stream.pipeline code examples handpicked from public code repositorys.
GitHub: thumbsup/thumbsup
47 48 49 50 51 52 53 54 55 56
child.stdin.write(allFiles + '\n') child.stdin.end() // stream <stdout> into a JSON parser // parse every top-level object and emit it on the stream return es.pipeline( child.stdout, through2(chunkToString), JSONStream.parse([true]) )
83
659
20
+ 11 other calls in file
193 194 195 196 197 198 199 200 201
``` js var es = require('event-stream') var ms = require('msgpack-stream') new MuxDemux({wrapper: function (stream) { return es.pipeline(ms.createDecodeStream(), stream, ms.createEncodeStream()) }}) ```
17
180
14
+ 3 other calls in file
GitHub: wprl/wainwright
59 60 61 62 63 64 65 66 67 68
tail: 'blog/page/%d/index.html', templateDirectory: './templates', perPage: 3 }; options = deco.merge(defaults, options); var stream = es.pipeline( es.through( function (article) { n += 1; metadata.page = Math.ceil(n / options.perPage);
0
12
4
GitHub: monettiaps/giovanni
214 215 216 217 218 219 220 221 222 223
// the data correctly into the desired representation. // The stream logic allows some streams to ensure that some basic rules, // such as enforcing a type property to exist, are followed. return res.format({ 'text/plain': function() { es.pipeline(output, force_typed_data(type_params), es.writeArray(function(err, out) { var output = formatWithSeparator(out, "\t"); res.send(output); })); }
0
0
0
+ 6 other calls in file
133 134 135 136 137 138 139 140 141 142
this.authenticated = false; this.socket = Net.createConnection(port, host, firstAction || NOOP); this.socket.on('connect', this.reemit('connect')); this.socket.on('timeout', this.reemit('timeout')); this.pipeline = es.pipeline(this.socket, this.resParser); var self = this; this.pipeline.on('data', function(data) {
0
0
0
event-stream.merge is the most popular function in event-stream (2389 examples)