diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2016-12-18 20:22:09 -0800 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2016-12-28 15:30:50 -0500 |
commit | 9946519fba73687d34dccd5813808252a1973f3c (patch) | |
tree | 74d7194d2a00743bcd905027195e7e8000c5ac5a /deps/npm/node_modules/readable-stream/lib/_stream_readable.js | |
parent | 4d3b487b791606ea965f6280ce0eeea03d79b660 (diff) | |
download | android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.gz android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.bz2 android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.zip |
deps: upgrade npm to 4.0.5
PR-URL: https://github.com/nodejs/node/pull/10330
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/readable-stream/lib/_stream_readable.js')
-rw-r--r-- | deps/npm/node_modules/readable-stream/lib/_stream_readable.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index 208cc65f1c..3a7d42d62b 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -10,6 +10,10 @@ var processNextTick = require('process-nextick-args'); var isArray = require('isarray'); /*</replacement>*/ +/*<replacement>*/ +var Duplex; +/*</replacement>*/ + Readable.ReadableState = ReadableState; /*<replacement>*/ @@ -57,6 +61,8 @@ var StringDecoder; util.inherits(Readable, Stream); function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. if (typeof emitter.prependListener === 'function') { return emitter.prependListener(event, fn); } else { @@ -68,7 +74,6 @@ function prependListener(emitter, event, fn) { } } -var Duplex; function ReadableState(options, stream) { Duplex = Duplex || require('./_stream_duplex'); @@ -138,7 +143,6 @@ function ReadableState(options, stream) { } } -var Duplex; function Readable(options) { Duplex = Duplex || require('./_stream_duplex'); @@ -461,7 +465,7 @@ function maybeReadMore_(stream, state) { // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); + this.emit('error', new Error('_read() is not implemented')); }; Readable.prototype.pipe = function (dest, pipeOpts) { @@ -639,16 +643,16 @@ Readable.prototype.unpipe = function (dest) { state.pipesCount = 0; state.flowing = false; - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this); }return this; } // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; + var index = indexOf(state.pipes, dest); + if (index === -1) return this; - state.pipes.splice(i, 1); + state.pipes.splice(index, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; |