Skip to content

Commit 4eec736

Browse files
kojiGit55BethGriggs
authored andcommitted
lib: chenged anonymous function to arrow function
PR-URL: #24605 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
1 parent 85e9487 commit 4eec736

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎lib/internal/process/warning.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ function writeOut(message) {
2020
}
2121

2222
functiononClose(fd){
23-
returnfunction(){
23+
return()=>{
2424
if(fs===null)fs=require('fs');
2525
fs.close(fd,nop);
2626
};
2727
}
2828

2929
functiononOpen(cb){
30-
returnfunction(err,fd){
30+
return(err,fd)=>{
3131
acquiringFd=false;
3232
if(fd!==undefined){
3333
cachedFd=fd;
@@ -41,7 +41,7 @@ function onOpen(cb) {
4141
functiononAcquired(message){
4242
// make a best effort attempt at writing the message
4343
// to the fd. Errors are ignored at this point.
44-
returnfunction(err,fd){
44+
return(err,fd)=>{
4545
if(err)
4646
returnwriteOut(message);
4747
if(fs===null)fs=require('fs');
@@ -70,7 +70,7 @@ function output(message) {
7070
}
7171

7272
functiondoEmitWarning(warning){
73-
returnfunction(){
73+
return()=>{
7474
process.emit('warning',warning);
7575
};
7676
}
@@ -104,7 +104,7 @@ function setupProcessWarnings() {
104104
// process.emitWarning(error)
105105
// process.emitWarning(str[, type[, code]][, ctor])
106106
// process.emitWarning(str[, options])
107-
process.emitWarning=function(warning,type,code,ctor,now){
107+
process.emitWarning=(warning,type,code,ctor,now)=>{
108108
vardetail;
109109
if(type!==null&&typeoftype==='object'&&!Array.isArray(type)){
110110
ctor=type.ctor;

0 commit comments

Comments
 (0)