Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Directly export the Stream constructor.
Browse files Browse the repository at this point in the history
Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.

Fixes #1933
  • Loading branch information
TooTallNate authored and ry committed Oct 24, 2011
1 parent 239b3d6 commit 58cb0fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/stream.js
Expand Up @@ -26,7 +26,9 @@ function Stream() {
events.EventEmitter.call(this);
}
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) {
var source = this;
Expand Down

0 comments on commit 58cb0fa

Please sign in to comment.