0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00

Directly export the Stream constructor.

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

Fixes #1933
This commit is contained in:
Nathan Rajlich 2011-10-24 14:52:10 -07:00 committed by Ryan Dahl
parent 239b3d62de
commit 58cb0fa639

View File

@ -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;