Browse Source

Directly export the Stream constructor.

Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933
v0.7.4-release
Nathan Rajlich 13 years ago
committed by Ryan Dahl
parent
commit
58cb0fa639
  1. 4
      lib/stream.js

4
lib/stream.js

@ -26,7 +26,9 @@ function Stream() {
events.EventEmitter.call(this); events.EventEmitter.call(this);
} }
util.inherits(Stream, events.EventEmitter); util.inherits(Stream, events.EventEmitter);
exports.Stream = Stream; module.exports = Stream;
// Backwards-compat with node 0.4.x
Stream.Stream = Stream;
Stream.prototype.pipe = function(dest, options) { Stream.prototype.pipe = function(dest, options) {
var source = this; var source = this;

Loading…
Cancel
Save