Skip to content

Commit

Permalink
src: replace var for let / const.
Browse files Browse the repository at this point in the history
Replace var for let or const.

PR-URL: #18649
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
estrada9166 authored and gibfahn committed Apr 13, 2018
1 parent d30c353 commit 973488b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/internal/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function getOrSetAsyncId(object) {
// the user to safeguard this call and make sure it's zero'd out when the
// constructor is complete.
function getDefaultTriggerAsyncId() {
var defaultTriggerAsyncId = async_id_fields[kDefaultTriggerAsyncId];
let defaultTriggerAsyncId = async_id_fields[kDefaultTriggerAsyncId];
// If defaultTriggerAsyncId isn't set, use the executionAsyncId
if (defaultTriggerAsyncId < 0)
defaultTriggerAsyncId = async_id_fields[kExecutionAsyncId];
Expand All @@ -279,7 +279,7 @@ function defaultTriggerAsyncIdScope(triggerAsyncId, block, ...args) {
const oldDefaultTriggerAsyncId = async_id_fields[kDefaultTriggerAsyncId];
async_id_fields[kDefaultTriggerAsyncId] = triggerAsyncId;

var ret;
let ret;
try {
ret = Reflect.apply(block, null, args);
} finally {
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
const fs = NativeModule.require('fs');
// read the source
const filename = Module._resolveFilename(process.argv[1]);
var source = fs.readFileSync(filename, 'utf-8');
const source = fs.readFileSync(filename, 'utf-8');
checkScriptSyntax(source, filename);
process.exit(0);
}
Expand Down Expand Up @@ -217,7 +217,7 @@
// Read all of stdin - execute it.
process.stdin.setEncoding('utf8');

var code = '';
let code = '';
process.stdin.on('data', function(d) {
code += d;
});
Expand Down Expand Up @@ -411,7 +411,7 @@
const versionTypes = icu.getVersion().split(',');

for (var n = 0; n < versionTypes.length; n++) {
var name = versionTypes[n];
const name = versionTypes[n];
const version = icu.getVersion(name);
Object.defineProperty(process.versions, name, {
writable: false,
Expand Down Expand Up @@ -579,7 +579,7 @@
];

NativeModule.prototype.compile = function() {
var source = NativeModule.getSource(this.id);
let source = NativeModule.getSource(this.id);
source = NativeModule.wrap(source);

this.loading = true;
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const ansi =

const kEscape = '\x1b';

var getStringWidth;
var isFullWidthCodePoint;
let getStringWidth;
let isFullWidthCodePoint;

function CSI(strings, ...args) {
let ret = `${kEscape}[`;
Expand Down

0 comments on commit 973488b

Please sign in to comment.