Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
http: named anonymous functions in _stream_readable.js
  • Loading branch information
radsimu committed Jul 11, 2018
commit 7f01ba9efca14a7881f601c90aa7c7ac6e0ae84d
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