Skip to content

Commit

Permalink
lib: change callbacks to arrow function
Browse files Browse the repository at this point in the history
PR-URL: #24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
  • Loading branch information
Naturalclar authored and BethGriggs committed Feb 12, 2019
1 parent 4eec736 commit eaa5e3e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
// To allow people to extend Node in different ways, this hook allows
// one to drop a file lib/_third_party_main.js into the build
// directory which will be executed instead of Node's normal loading.
process.nextTick(function() {
process.nextTick(() => {
NativeModule.require('_third_party_main');
});
} else if (process.argv[1] === 'inspect' || process.argv[1] === 'debug') {
Expand All @@ -234,7 +234,7 @@
}

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

Expand Down Expand Up @@ -287,14 +287,14 @@
if (process._forceRepl || NativeModule.require('tty').isatty(0)) {
// REPL
const cliRepl = NativeModule.require('internal/repl');
cliRepl.createInternalRepl(process.env, function(err, repl) {
cliRepl.createInternalRepl(process.env, (err, repl) => {
if (err) {
throw err;
}
repl.on('exit', function() {
repl.on('exit', () => {
if (repl._flushing) {
repl.pause();
return repl.once('flushHistory', function() {
return repl.once('flushHistory', () => {
process.exit();
});
}
Expand All @@ -311,7 +311,7 @@
process.stdin.setEncoding('utf8');

let code = '';
process.stdin.on('data', function(d) {
process.stdin.on('data', (d) => {
code += d;
});

Expand Down Expand Up @@ -484,7 +484,7 @@
emitAfter
} = NativeModule.require('internal/async_hooks');

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

0 comments on commit eaa5e3e

Please sign in to comment.