From 58cb0fa639e7105de1b479a877dbbd492f59f3c2 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 24 Oct 2011 14:52:10 -0700 Subject: [PATCH] Directly export the Stream constructor. Also setting up a circular reference back to the stream as `Stream.Stream`, for backwards-compatibility. Fixes #1933 --- lib/stream.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/stream.js b/lib/stream.js index 90d4d5c..530b087 100644 --- a/lib/stream.js +++ b/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; -- 2.7.4