How to use the on function from readable-stream
Find comprehensive JavaScript readable-stream.on code examples handpicked from public code repositorys.
3110 3111 3112 3113 3114 3115 3116 3117 3118 3119
} }; stream.text = () => new Promise((resolve, reject) => { let body = ''; stream.setEncoding('utf8'); stream.on('data', chunk => body += chunk); stream.on('end', () => resolve(body)); stream.on('error', reject); }); process.nextTick(doDownload);
2
3
1
+ 16 other calls in file
5466 5467 5468 5469 5470 5471 5472 5473 5474 5475
// This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. Readable.prototype.wrap = function (stream) { var state = this._readableState; var paused = false; stream.on('end', () => { debug('wrapped end'); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); if (chunk && chunk.length) this.push(chunk);
0
0
1
+ 83 other calls in file
readable-stream.call is the most popular function in readable-stream (1227 examples)