index.js
function(options) {
  // Ensure an instance is created
  if (!(this instanceof TimeChunkedStream)) {
    return new TimeChunkedStream(options);
  }

  // Always decode strings
  options.decodeStrings = true;

  // Initialize base class
  Transform.call(this, options);

  // Create internal buffer
  this._buffer  = new BufferBuilder();
  this._timeout = options.timeout;
  this._timer   = null;
}
function(options) {
  // Ensure an instance is created
  if (!(this instanceof TimeChunkedStream)) {
    return new TimeChunkedStream(options);
  }

  // Always decode strings
  options.decodeStrings = true;

  // Initialize base class
  Transform.call(this, options);

  // Create internal buffer
  this._buffer  = new BufferBuilder();
  this._timeout = options.timeout;
  this._timer   = null;
}
function ( options ) { // Ensure an instance is created if ( ! ( this instanceof TimeChunkedStream ) ) { return new TimeChunkedStream ( options ) ; } // Always decode strings options . decodeStrings = true ; // Initialize base class Transform . call ( this , options ) ; // Create internal buffer this . _buffer = new BufferBuilder ( ) ; this . _timeout = options . timeout ; this . _timer = null ; }
Construct a new TimeChunkedStream, that will buffer data for
`options.timeout` milliseconds
Construct a new TimeChunkedStream that will buffer data for options . timeout milliseconds