From d0c16f4b2a9f8abdf61e948655fa1db2b3ffb5bb Mon Sep 17 00:00:00 2001 From: "Simionescu, Radu" Date: Wed, 11 Jul 2018 11:38:52 +0100 Subject: [PATCH] stream: named anonymous functions in _stream_readable.js PR-URL: https://github.com/nodejs/node/pull/21750 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- lib/_stream_readable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 31b129facd3a38..0b5cac6b8376e3 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -721,7 +721,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { }; function pipeOnDrain(src) { - return function() { + return function pipeOnDrainFunctionResult() { var state = src._readableState; debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) @@ -951,8 +951,8 @@ Readable.prototype.wrap = function(stream) { // important when wrapping filters and duplexes. for (var i in stream) { if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function(method) { - return function() { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { return stream[method].apply(stream, arguments); }; }(i);