summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
author/Jesse <jesse.katsumata@gmail.com>2018-11-24 16:42:51 +0900
committerRich Trott <rtrott@gmail.com>2018-11-28 19:21:41 -0800
commit0f18a403741ff4cca80d7b6b5937e06fd50c3900 (patch)
tree65173c3f78d9674ef365c0c5a586d640188f81a3 /lib
parent27139fc37c58bb9c344158bfb7276df5bfadae27 (diff)
downloadandroid-node-v8-0f18a403741ff4cca80d7b6b5937e06fd50c3900.tar.gz
android-node-v8-0f18a403741ff4cca80d7b6b5937e06fd50c3900.tar.bz2
android-node-v8-0f18a403741ff4cca80d7b6b5937e06fd50c3900.zip
lib: change callbacks to arrow function
PR-URL: https://github.com/nodejs/node/pull/24625 Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/bootstrap/node.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index 21544bceb4..a207dd648f 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -240,7 +240,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') {
@@ -251,7 +251,7 @@
}
// Start the debugger agent.
- process.nextTick(function() {
+ process.nextTick(() => {
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
});
@@ -304,14 +304,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();
});
}
@@ -328,7 +328,7 @@
process.stdin.setEncoding('utf8');
let code = '';
- process.stdin.on('data', function(d) {
+ process.stdin.on('data', (d) => {
code += d;
});
@@ -567,7 +567,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();