Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: replace var for let / const. #18649

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/internal/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,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 @@ -276,7 +276,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 @@ -176,7 +176,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 @@ -222,7 +222,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 @@ -495,7 +495,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 @@ -670,7 +670,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