Skip to content

Commit

Permalink
stream: named anonymous functions in _stream_readable.js
Browse files Browse the repository at this point in the history
PR-URL: #21750
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
radsimu authored and targos committed Jul 19, 2018
1 parent c45623a commit d0c16f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d0c16f4

Please sign in to comment.