Skip to content

Commit

Permalink
readline,zlib: named anonymous functions
Browse files Browse the repository at this point in the history
PR-URL: #21792
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
  • Loading branch information
antsmartian authored and targos committed Aug 2, 2018
1 parent a60060b commit 76a6592
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

Expand Down Expand Up @@ -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 = {};
Expand Down

0 comments on commit 76a6592

Please sign in to comment.