How to use the call function from readable-stream
Find comprehensive JavaScript readable-stream.call code examples handpicked from public code repositorys.
GitHub: mcollina/msgpack5
![mcollina profile picture](/mcollina.png?size=40)
7 8 9 10 11 12 13 14 15
opts = opts || {} opts.objectMode = true opts.highWaterMark = 16 Transform.call(this, opts) this._msgpack = opts.msgpack }
+ 11 other calls in file
4655 4656 4657 4658 4659 4660 4661 4662 4663 4664
if(!(this instanceof SVGPathDataEncoder)) { return new SVGPathDataEncoder(options); } // Parent constructor TransformStream.call(this, { objectMode: true }); // Setting objectMode separately
+ 2 other calls in file
GitHub: csvconf/csvconf.com
![csvconf profile picture](/csvconf.png?size=40)
238 239 240 241 242 243 244 245 246
if (encoding === 'u8' || encoding === 'uint8') { encoding = 'uint8array' } } Writable.call(this, { objectMode: true }) this.encoding = encoding this.shouldInferEncoding = shouldInferEncoding
+ 31 other calls in file
GitHub: uber/logtron
![uber profile picture](/uber.png?size=40)
23 24 25 26 27 28 29 30 31
function LoggerStream(logger, opts, destroyCb) { if (!(this instanceof LoggerStream)) { return new LoggerStream(logger, opts, destroyCb); } Writable.call(this, { objectMode: true, highWaterMark: opts.highWaterMark });
+ 11 other calls in file
GitHub: GraftJS/graft
![GraftJS profile picture](/GraftJS.png?size=40)
10 11 12 13 14 15 16 17 18 19
function Graft() { if (!(this instanceof Graft)) { return new Graft(); } Transform.call(this, { objectMode: true, highWaterMark: 16 }); var that = this; function readFirst() {
GitHub: arjunmehta/multiview
![arjunmehta profile picture](/arjunmehta.png?size=40)
4 5 6 7 8 9 10 11 12 13
util.inherits(Stream, PassThrough); function Stream(main, name, silentMode) { PassThrough.call(this); this.main = main; this.receiver = main.receiver; this.id = name;
+ 11 other calls in file
83 84 85 86 87 88 89 90 91 92
var Transform = require('stream').Transform var StringDecoder = require('string_decoder').StringDecoder var inherits = require('inherits') function CipherBase (hashMode) { Transform.call(this) this.hashMode = typeof hashMode === 'string' if (this.hashMode) { this[hashMode] = this._finalOrDigest } else {
+ 3 other calls in file
10 11 12 13 14 15 16 17 18 19
this._prefixes = { _: basename } this._count = 0 this._filter = opts.filter this._offset = opts.offset || 0 this._limit = opts.limit && opts.limit + this._offset Transform.call(this, Object.assign(opts, { objectMode: true })) this._sources = [] this.once('pipe', (source) => { source.on('error', e => this.emit('error', e)) this._sources.push(source)
GitHub: s3ththompson/readrc
![s3ththompson profile picture](/s3ththompson.png?size=40)
11 12 13 14 15 16 17 18 19 20
if (!(this instanceof Feed)) return new Feed() assert.equal(typeof opts.name, 'string', 'Feed: feed constructor must be initialized with opts.name') assert.equal(typeof opts.url, 'string', 'Feed: feed constructor must be initialized with opts.url') this.name = opts.name this.url = opts.url Readable.call(this, { objectMode: true }) this._forwarding = false var req = request(this.url, {timeout: 10000, pool: false})
GitHub: CategoricalData/hydra
1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250
* @param {StreamHelper} helper the helper wrapping the worker * @param {Object} options the nodejs stream options * @param {Function} updateCb the update callback. */ function NodejsStreamOutputAdapter(helper, options, updateCb) { Readable.call(this, options); this._helper = helper; var self = this; helper.on("data", function (data, meta) {
53 54 55 56 57 58 59 60 61 62
this.emit('close') } var Pack = function(opts) { if (!(this instanceof Pack)) return new Pack(opts) Readable.call(this, opts) this._drain = noop this._finalized = false this._finalizing = false
GitHub: ShanniLi/hexer
![ShanniLi profile picture](/ShanniLi.png?size=40)
15 16 17 18 19 20 21 22 23 24
if (options.colored) { var newOptions = copyInto(render.coloredOptions); extendInto(newOptions, options); options = newOptions; } Transform.call(this, options); var self = this; self.options = options; self.prefix = self.options.prefix || ''; self.cols = self.options.cols || 16;
37 38 39 40 41 42 43 44 45 46 47 48 49
this._parent.destroy(err) } var Extract = function (opts) { if (!(this instanceof Extract)) return new Extract(opts) Writable.call(this, opts) opts = opts || {} this._offset = 0
9 10 11 12 13 14 15 16 17 18 19 20 21
server: require('debug')('spdy:stream:server') } var Duplex = require('readable-stream').Duplex function Stream (connection, options) { Duplex.call(this) var connectionState = connection._spdyState var state = {}
44 45 46 47 48 49 50 51 52
function Class(override) { if (!(this instanceof Class)) return new Class(override) this._reading = false this._callback = check this.destroyed = false Readable.call(this, override || opts) var self = this var hwm = this._readableState.highWaterMark
27 28 29 30 31 32 33 34 35 36 37 38 39
callback = null } BufferList._init.call(this, callback) DuplexStream.call(this) } inherits(BufferListStream, DuplexStream) Object.assign(BufferListStream.prototype, BufferList.prototype)
10 11 12 13 14 15 16 17 18 19 20 21 22 23
function ReadStream (options, makeData) { if (!(this instanceof ReadStream)) return new ReadStream(options, makeData) Readable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }) // purely to keep `db` around until we're done so it's not GCed if the user doesn't keep a ref this._waiting = false
5 6 7 8 9 10 11 12 13 14 15 16 17
var inherits = require('inherits'); var Duplex = require('readable-stream').Duplex; function Compressor(options) { Duplex.call(this, { writableObjectMode: true }); this._encoder = null;
32 33 34 35 36 37 38 39 40 41 42 43
util.inherits(WriteStreamAtomic, Writable) function WriteStreamAtomic (path, options) { if (!(this instanceof WriteStreamAtomic)) { return new WriteStreamAtomic(path, options) } Writable.call(this, options) this.__isWin = options && options.hasOwnProperty('isWin') ? options.isWin : process.platform === 'win32' this.__atomicTarget = path
readable-stream.call is the most popular function in readable-stream (1227 examples)