How to use the pipeline function from event-stream

Find comprehensive JavaScript event-stream.pipeline code examples handpicked from public code repositorys.

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])
)
fork icon83
star icon659
watch icon20

+ 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())
}})

```
fork icon17
star icon180
watch icon14

+ 3 other calls in file

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);
fork icon0
star icon12
watch icon4

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);
    }));
  }
fork icon0
star icon0
watch icon0

+ 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) {
fork icon0
star icon0
watch icon0