From 76a65921d39f91a96eea3f03d83a8d4484c6cc99 Mon Sep 17 00:00:00 2001 From: Anto Aravinth Date: Sat, 14 Jul 2018 18:52:49 +0530 Subject: [PATCH] readline,zlib: named anonymous functions PR-URL: https://github.com/nodejs/node/pull/21792 Reviewed-By: Anatoli Papirovski Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell Reviewed-By: Jon Moss --- lib/readline.js | 2 +- lib/zlib.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index 89dd1b84f2dde0..cec88845d12cae 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -845,7 +845,7 @@ Interface.prototype._ttyWrite = function(s, key) { if (this.listenerCount('SIGTSTP') > 0) { this.emit('SIGTSTP'); } else { - process.once('SIGCONT', (function(self) { + process.once('SIGCONT', (function continueProcess(self) { return function() { // Don't raise events if stream has already been abandoned. if (!self.paused) { diff --git a/lib/zlib.js b/lib/zlib.js index d8a1cb57c5a892..4e82c6f2459d6b 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -473,7 +473,7 @@ function processChunkSync(self, chunk, flushFlag) { var chunkSize = self._chunkSize; var error; - self.on('error', function(er) { + self.on('error', function onError(er) { error = er; }); @@ -691,11 +691,11 @@ inherits(Unzip, Zlib); function createConvenienceMethod(ctor, sync) { if (sync) { - return function(buffer, opts) { + return function syncBufferWrapper(buffer, opts) { return zlibBufferSync(new ctor(opts), buffer); }; } else { - return function(buffer, opts, callback) { + return function asyncBufferWrapper(buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {};