How to use the stream.Readable.call function in stream

To help you get started, we’ve selected a few stream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mongodb-utils / mongodb-next / lib / collection / aggregate.js View on Github external
function Aggregate(collection, options) {
  if (!(this instanceof Aggregate)) return new Aggregate(collection, options)

  // readable mode for streaming the cursor
  Readable.call(this, {
    objectMode: true
  })

  this.collection = collection
  this.options = options = options || {}
  this.pipeline = []
}
github NodeRT / NodeRT / modules / nodert-streams / index.js View on Github external
function InputStream(source, options) {
  if (!(this instanceof InputStream))
    return new InputStream(source, options);

  Readable.call(this, options);

  options = options || { highWaterMark: 16 * 1024 }; 

  // source is a winrt iinputstream, such as a socket or file
  this._source = source;
  this._buffer = new Buffer(options.highWaterMark);
}
github mongodb-utils / mongodb-next / lib / collection / query / query.js View on Github external
function Query(collection, options) {
  if (!(this instanceof Query)) return new Query(collection, options)

  Readable.call(this, {
    objectMode: true
  })

  this.collection = collection
  this.criteria = {}
  this.document = {}
  this.options = options || {}
  // which type of .then() is set
  this._then = 'query'
}
github LaurentZuijdwijk / streaming-cache / lib / readStream.js View on Github external
function ReadStream() {
    Readable.call(this);
    this._offset = 0;
    this.readable = false;
    this.complete = false;
    this._object = new Buffer(0);
}
github dyo / dyo / src / Server / Stream.js View on Github external
function Stream (element, host) {
	this.host = host
	this.stack = [element]

	Readable.call(this)
}
/**

stream

Node.js streams in the browser

MIT
Latest version published 4 months ago

Package Health Score

72 / 100
Full package analysis