lib: changed var to const in internal/v8_polyfill
PR-URL: https://github.com/nodejs/node/pull/8615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
3ddc9dba7e
commit
99f64f778b
@ -67,13 +67,13 @@ var line = '';
|
||||
versionCheck();
|
||||
function readline() {
|
||||
while (true) {
|
||||
var lineBreak = line.indexOf('\n');
|
||||
const lineBreak = line.indexOf('\n');
|
||||
if (lineBreak !== -1) {
|
||||
var res = line.slice(0, lineBreak);
|
||||
const res = line.slice(0, lineBreak);
|
||||
line = line.slice(lineBreak + 1);
|
||||
return res;
|
||||
}
|
||||
var bytes = fs.readSync(fd, buf, 0, buf.length);
|
||||
const bytes = fs.readSync(fd, buf, 0, buf.length);
|
||||
line += dec.write(buf.slice(0, bytes));
|
||||
if (line.length === 0) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user