How to use the emit function from readable-stream
Find comprehensive JavaScript readable-stream.emit code examples handpicked from public code repositorys.
2901 2902 2903 2904 2905 2906 2907 2908 2909 2910
activeDecodedStream = null; retries = 0; let inc = opts.backoff.inc; let ms = Math.min(inc, opts.backoff.max); retryTimeout = setTimeout(doDownload, ms); stream.emit('reconnect', reconnects, err); }; const reconnectIfEndedEarly = (err) => { if (options.method !== 'HEAD' && !downloadComplete() && reconnects++ < opts.maxReconnects) { reconnect(err);
2
3
1
+ 23 other calls in file
GitHub: Zuberkhan56/livestream
3463 3464 3465 3466 3467 3468 3469 3470 3471 3472
if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); } else if (state.ended) { stream.emit('error', new Error('stream.push() after EOF')); } else { state.reading = false;
0
0
0
+ 50 other calls in file
readable-stream.call is the most popular function in readable-stream (1227 examples)