@@ -19,9 +19,9 @@ function dummyDestroy(err, cb) {
1919}
2020
2121function getMainThreadStdio ( ) {
22- var stdin ;
23- var stdout ;
24- var stderr ;
22+ let stdin ;
23+ let stdout ;
24+ let stderr ;
2525
2626 function getStdout ( ) {
2727 if ( stdout ) return stdout ;
@@ -53,7 +53,7 @@ function getMainThreadStdio() {
5353
5454 switch ( guessHandleType ( fd ) ) {
5555 case 'TTY' :
56- var tty = require ( 'tty' ) ;
56+ const tty = require ( 'tty' ) ;
5757 stdin = new tty . ReadStream ( fd , {
5858 highWaterMark : 0 ,
5959 readable : true ,
@@ -62,13 +62,13 @@ function getMainThreadStdio() {
6262 break ;
6363
6464 case 'FILE' :
65- var fs = require ( 'fs' ) ;
65+ const fs = require ( 'fs' ) ;
6666 stdin = new fs . ReadStream ( null , { fd : fd , autoClose : false } ) ;
6767 break ;
6868
6969 case 'PIPE' :
7070 case 'TCP' :
71- var net = require ( 'net' ) ;
71+ const net = require ( 'net' ) ;
7272
7373 // It could be that process has been started with an IPC channel
7474 // sitting on fd=0, in such case the pipe for this fd is already
@@ -147,11 +147,11 @@ function getMainThreadStdio() {
147147}
148148
149149function createWritableStdioStream ( fd ) {
150- var stream ;
150+ let stream ;
151151 // Note stream._type is used for test-module-load-list.js
152152 switch ( guessHandleType ( fd ) ) {
153153 case 'TTY' :
154- var tty = require ( 'tty' ) ;
154+ const tty = require ( 'tty' ) ;
155155 stream = new tty . WriteStream ( fd ) ;
156156 stream . _type = 'tty' ;
157157 break ;
@@ -164,7 +164,7 @@ function createWritableStdioStream(fd) {
164164
165165 case 'PIPE' :
166166 case 'TCP' :
167- var net = require ( 'net' ) ;
167+ const net = require ( 'net' ) ;
168168
169169 // If fd is already being used for the IPC channel, libuv will return
170170 // an error when trying to use it again. In that case, create the socket
0 commit comments