Skip to content

Commit eaa5e3e

Browse files
NaturalclarBethGriggs
authored andcommitted
lib: change callbacks to arrow function
PR-URL: #24625 Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Masashi Hirano <[email protected]>
1 parent 4eec736 commit eaa5e3e

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
@@ -223,7 +223,7 @@
223223
// To allow people to extend Node in different ways, this hook allows
224224
// one to drop a file lib/_third_party_main.js into the build
225225
// directory which will be executed instead of Node's normal loading.
226-
process.nextTick(function() {
226+
process.nextTick(() => {
227227
NativeModule.require('_third_party_main');
228228
});
229229
} else if (process.argv[1] === 'inspect' || process.argv[1] === 'debug') {
@@ -234,7 +234,7 @@
234234
}
235235

236236
// Start the debugger agent.
237-
process.nextTick(function() {
237+
process.nextTick(() => {
238238
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
239239
});
240240

@@ -287,14 +287,14 @@
287287
if (process._forceRepl || NativeModule.require('tty').isatty(0)) {
288288
// REPL
289289
const cliRepl = NativeModule.require('internal/repl');
290-
cliRepl.createInternalRepl(process.env, function(err, repl) {
290+
cliRepl.createInternalRepl(process.env, (err, repl) => {
291291
if (err) {
292292
throw err;
293293
}
294-
repl.on('exit', function() {
294+
repl.on('exit', () => {
295295
if (repl._flushing) {
296296
repl.pause();
297-
return repl.once('flushHistory', function() {
297+
return repl.once('flushHistory', () => {
298298
process.exit();
299299
});
300300
}
@@ -311,7 +311,7 @@
311311
process.stdin.setEncoding('utf8');
312312

313313
let code = '';
314-
process.stdin.on('data', function(d) {
314+
process.stdin.on('data', (d) => {
315315
code += d;
316316
});
317317

@@ -484,7 +484,7 @@
484484
emitAfter
485485
} = NativeModule.require('internal/async_hooks');
486486

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

0 commit comments

Comments
 (0)