How to use the prototype function from readable-stream
Find comprehensive JavaScript readable-stream.prototype code examples handpicked from public code repositorys.
GitHub: azproduction/lmd
![azproduction profile picture](/azproduction.png?size=40)
38 39 40 41 42 43 44 45 46
this._receiverCapacity += size; this._push(); }; DataStream.prototype.end = function () { Duplex.prototype.end.apply(this, arguments); this._finished = true; this._push(); };
GitHub: uber/logtron
![uber profile picture](/uber.png?size=40)
44 45 46 47 48 49 50 51 52 53
if (self.closed) { cb(null); // lal return false; } return Writable.prototype.write.call(self, entry, cb); }; LoggerStream.prototype._write = function write(entry, enc, cb) { var self = this;
+ 11 other calls in file
56 57 58 59 60 61 62 63 64 65 66 67
this.push(this.slice(0, size)) this.consume(size) } BufferListStream.prototype.end = function end (chunk) { DuplexStream.prototype.end.call(this, chunk) if (this._callback) { this._callback(null, this.slice()) this._callback = null
57 58 59 60 61 62 63 64 65 66 67
// data has been written to our target stream. So we suppress // finish from being emitted here, and only emit it after our // target stream is closed and we've moved everything around. WriteStreamAtomic.prototype.emit = function (event) { if (event === 'finish') return this.__atomicStream.end() return Writable.prototype.emit.apply(this, arguments) } WriteStreamAtomic.prototype._write = function (buffer, encoding, cb) { var flushed = this.__atomicStream.write(buffer, encoding)
readable-stream.call is the most popular function in readable-stream (1227 examples)