Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-02-05 09:06:08 +0300
committerRich Trott <rtrott@gmail.com>2019-02-07 09:18:31 +0300
commit29e74d4952b772f7f1bf51e1a8f1665bbbde39d1 (patch)
tree211a7131ae8f0fa7d8d5f65422cd53ad0741de33 /benchmark/tls/tls-connect.js
parentd310d8df62f9c05d07e68c4177f225e9dda72271 (diff)
benchmark: refactor for consistent style
Code in benchmark directory sometimes uses `function () {}` for anonymous callbacks and sometimes uses `() => {}`. Multi-line arrays sometimes have a trailing comma and sometimes do not. Update to always use arrow functions for anonymous callbacks and trailing commas for multiline arrays. PR-URL: https://github.com/nodejs/node/pull/25944 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/tls/tls-connect.js')
-rw-r--r--benchmark/tls/tls-connect.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js
index fd7ea89b3b2..470d536f87e 100644
--- a/benchmark/tls/tls-connect.js
+++ b/benchmark/tls/tls-connect.js
@@ -46,9 +46,9 @@ function makeConnection() {
port: common.PORT,
rejectUnauthorized: false
};
- var conn = tls.connect(options, function() {
+ var conn = tls.connect(options, () => {
clientConn++;
- conn.on('error', function(er) {
+ conn.on('error', (er) => {
console.error('client error', er);
throw er;
});