Skip to content

Commit 76a6592

Browse files
antsmartiantargos
authored andcommitted
readline,zlib: named anonymous functions
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>
1 parent a60060b commit 76a6592

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎lib/readline.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ Interface.prototype._ttyWrite = function(s, key) {
845845
if(this.listenerCount('SIGTSTP')>0){
846846
this.emit('SIGTSTP');
847847
}else{
848-
process.once('SIGCONT',(function(self){
848+
process.once('SIGCONT',(functioncontinueProcess(self){
849849
returnfunction(){
850850
// Don't raise events if stream has already been abandoned.
851851
if(!self.paused){

‎lib/zlib.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ function processChunkSync(self, chunk, flushFlag) {
473473
varchunkSize=self._chunkSize;
474474

475475
varerror;
476-
self.on('error',function(er){
476+
self.on('error',functiononError(er){
477477
error=er;
478478
});
479479

@@ -691,11 +691,11 @@ inherits(Unzip, Zlib);
691691

692692
functioncreateConvenienceMethod(ctor,sync){
693693
if(sync){
694-
returnfunction(buffer,opts){
694+
returnfunctionsyncBufferWrapper(buffer,opts){
695695
returnzlibBufferSync(newctor(opts),buffer);
696696
};
697697
}else{
698-
returnfunction(buffer,opts,callback){
698+
returnfunctionasyncBufferWrapper(buffer,opts,callback){
699699
if(typeofopts==='function'){
700700
callback=opts;
701701
opts={};

0 commit comments

Comments
 (0)