| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d70ec60 commit 956207f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,9 +19,9 @@ function dummyDestroy(err, cb) { | |||
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | 21 | function getMainThreadStdio() { | |
| 22 | - var stdin; | ||
| 23 | - var stdout; | ||
| 24 | - var stderr; | ||
| 22 | + let stdin; | ||
| 23 | + let stdout; | ||
| 24 | + let stderr; | ||
| 25 | 25 | ||
| 26 | 26 | function getStdout() { | |
| 27 | 27 | if (stdout) return stdout; | |
@@ -53,7 +53,7 @@ function getMainThreadStdio() { | |||
| 53 | 53 | ||
| 54 | 54 | switch (guessHandleType(fd)) { | |
| 55 | 55 | case 'TTY': | |
| 56 | - var tty = require('tty'); | ||
| 56 | + const tty = require('tty'); | ||
| 57 | 57 | stdin = new tty.ReadStream(fd, { | |
| 58 | 58 | highWaterMark: 0, | |
| 59 | 59 | readable: true, | |
@@ -62,13 +62,13 @@ function getMainThreadStdio() { | |||
| 62 | 62 | break; | |
| 63 | 63 | ||
| 64 | 64 | case 'FILE': | |
| 65 | - var fs = require('fs'); | ||
| 65 | + const fs = require('fs'); | ||
| 66 | 66 | stdin = new fs.ReadStream(null, { fd: fd, autoClose: false }); | |
| 67 | 67 | break; | |
| 68 | 68 | ||
| 69 | 69 | case 'PIPE': | |
| 70 | 70 | case 'TCP': | |
| 71 | - var net = require('net'); | ||
| 71 | + const net = require('net'); | ||
| 72 | 72 | ||
| 73 | 73 | // It could be that process has been started with an IPC channel | |
| 74 | 74 | // sitting on fd=0, in such case the pipe for this fd is already | |
@@ -147,11 +147,11 @@ function getMainThreadStdio() { | |||
| 147 | 147 | } | |
| 148 | 148 | ||
| 149 | 149 | function createWritableStdioStream(fd) { | |
| 150 | - var stream; | ||
| 150 | + let stream; | ||
| 151 | 151 | // Note stream._type is used for test-module-load-list.js | |
| 152 | 152 | switch (guessHandleType(fd)) { | |
| 153 | 153 | case 'TTY': | |
| 154 | - var tty = require('tty'); | ||
| 154 | + const tty = require('tty'); | ||
| 155 | 155 | stream = new tty.WriteStream(fd); | |
| 156 | 156 | stream._type = 'tty'; | |
| 157 | 157 | break; | |
@@ -164,7 +164,7 @@ function createWritableStdioStream(fd) { | |||
| 164 | 164 | ||
| 165 | 165 | case 'PIPE': | |
| 166 | 166 | case 'TCP': | |
| 167 | - var net = require('net'); | ||
| 167 | + const net = require('net'); | ||
| 168 | 168 | ||
| 169 | 169 | // If fd is already being used for the IPC channel, libuv will return | |
| 170 | 170 | // an error when trying to use it again. In that case, create the socket | |
| Back | FazBrowse Home | New Git URL |
0 commit comments