Skip to content

Commit 97b803f

Browse files
Naturalclartargos
authored andcommitted
lib: change callbacks to arrow function
PR-URL: #24625 Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
1 parent c26b10c commit 97b803f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/internal/bootstrap/node.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
// To allow people to extend Node in different ways, this hook allows
241241
// one to drop a file lib/_third_party_main.js into the build
242242
// directory which will be executed instead of Node's normal loading.
243-
process.nextTick(function() {
243+
process.nextTick(() => {
244244
NativeModule.require('_third_party_main');
245245
});
246246
} else if (process.argv[1] === 'inspect' || process.argv[1] === 'debug') {
@@ -251,7 +251,7 @@
251251
}
252252

253253
// Start the debugger agent.
254-
process.nextTick(function() {
254+
process.nextTick(() => {
255255
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
256256
});
257257

@@ -304,14 +304,14 @@
304304
if (process._forceRepl || NativeModule.require('tty').isatty(0)) {
305305
// REPL
306306
const cliRepl = NativeModule.require('internal/repl');
307-
cliRepl.createInternalRepl(process.env, function(err, repl) {
307+
cliRepl.createInternalRepl(process.env, (err, repl) => {
308308
if (err) {
309309
throw err;
310310
}
311-
repl.on('exit', function() {
311+
repl.on('exit', () => {
312312
if (repl._flushing) {
313313
repl.pause();
314-
return repl.once('flushHistory', function() {
314+
return repl.once('flushHistory', () => {
315315
process.exit();
316316
});
317317
}
@@ -328,7 +328,7 @@
328328
process.stdin.setEncoding('utf8');
329329

330330
let code = '';
331-
process.stdin.on('data', function(d) {
331+
process.stdin.on('data', (d) => {
332332
code += d;
333333
});
334334

@@ -567,7 +567,7 @@
567567
emitAfter
568568
} = NativeModule.require('internal/async_hooks');
569569

570-
process._fatalException = function(er) {
570+
process._fatalException = (er) => {
571571
// It's possible that defaultTriggerAsyncId was set for a constructor
572572
// call that threw and was never cleared. So clear it now.
573573
clearDefaultTriggerAsyncId();

0 commit comments

Comments
 (0)