Browse files

Directly export the Stream constructor.

Also setting up a circular reference back to the
stream as `Stream.Stream`, for backwards-compatibility.
  • Loading branch information...
1 parent 239b3d6 commit 3dcb8b446aac0c9be46e9b22953bf290c0356a88 @TooTallNate committed Oct 24, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/stream.js
View
4 lib/stream.js
@@ -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;

0 comments on commit 3dcb8b4

Please sign in to comment.