From beb288b63915c934e00c8a6e0eece2b0534a5137 Mon Sep 17 00:00:00 2001 From: Adri Van Houdt Date: Sat, 17 Sep 2016 12:48:06 +0200 Subject: [PATCH] lib: changed var to const in internal/v8_polyfill PR-URL: https://github.com/nodejs/node/pull/8615 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/internal/v8_prof_polyfill.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/v8_prof_polyfill.js b/lib/internal/v8_prof_polyfill.js index eed927f12a..b4c025d50e 100644 --- a/lib/internal/v8_prof_polyfill.js +++ b/lib/internal/v8_prof_polyfill.js @@ -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;