readline,zlib: named anonymous functions
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
1f56c566c4
commit
fc6f49a704
@ -843,7 +843,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) {
|
||||
|
@ -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 = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user