Exemplo n.º 1
0
function Readable(options) {
  if (!(this instanceof Readable)) {
    return new Readable(options);
  }

  this._readableState = new ReadableState(options);

  Stream.call(this);
}
Exemplo n.º 2
0
function Writable(options) {
  if (!(this instanceof Writable) && options._isDuplex !== true) {
    return new Writable(options);
  }

  this._writableState = new WritableState(options);

  Stream.call(this);
}