Browse Source

stream: fix typo

Also: Revert "stream: Override addListener as well as on"

This reverts commit 18c985919d.
v0.9.6-release
Shigeki Ohtsu 12 years ago
committed by isaacs
parent
commit
1211946a8c
  1. 4
      lib/_stream_readable.js

4
lib/_stream_readable.js

@ -510,7 +510,7 @@ Readable.prototype.unpipe = function(dest) {
// kludge for on('data', fn) consumers. Sad. // kludge for on('data', fn) consumers. Sad.
// This is *not* part of the new readable stream interface. // This is *not* part of the new readable stream interface.
// It is an ugly unfortunate mess of history. // It is an ugly unfortunate mess of history.
Readable.prototype.addListener = Readable.prototype.on = function(ev, fn) { Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn); var res = Stream.prototype.on.call(this, ev, fn);
// https://github.com/isaacs/readable-stream/issues/16 // https://github.com/isaacs/readable-stream/issues/16
@ -549,7 +549,7 @@ function emitDataEvents(stream, startPaused) {
// convert to an old-style stream. // convert to an old-style stream.
stream.readable = true; stream.readable = true;
stream.pipe = Stream.prototype.pipe; stream.pipe = Stream.prototype.pipe;
stream.on = stream.addEventListener = Stream.prototype.on; stream.on = stream.addListener = Stream.prototype.on;
stream.on('readable', function() { stream.on('readable', function() {
readable = true; readable = true;

Loading…
Cancel
Save