summaryrefslogtreecommitdiff
path: root/benchmark/util
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-02-04 22:06:08 -0800
committerRich Trott <rtrott@gmail.com>2019-02-06 22:18:31 -0800
commit29e74d4952b772f7f1bf51e1a8f1665bbbde39d1 (patch)
tree211a7131ae8f0fa7d8d5f65422cd53ad0741de33 /benchmark/util
parentd310d8df62f9c05d07e68c4177f225e9dda72271 (diff)
downloadandroid-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.tar.gz
android-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.tar.bz2
android-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.zip
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/util')
-rw-r--r--benchmark/util/inspect.js2
-rw-r--r--benchmark/util/normalize-encoding.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/util/inspect.js b/benchmark/util/inspect.js
index 9ba3020fd0..fd6f6158cd 100644
--- a/benchmark/util/inspect.js
+++ b/benchmark/util/inspect.js
@@ -23,7 +23,7 @@ const bench = common.createBenchmark(main, {
'Array',
'TypedArray',
'TypedArray_extra',
- 'Number'
+ 'Number',
],
option: Object.keys(opts)
});
diff --git a/benchmark/util/normalize-encoding.js b/benchmark/util/normalize-encoding.js
index 47c8bce277..464bda52f3 100644
--- a/benchmark/util/normalize-encoding.js
+++ b/benchmark/util/normalize-encoding.js
@@ -16,7 +16,7 @@ const inputs = [
'', 'utf8', 'utf-8', 'UTF-8', 'UTF8', 'Utf8',
'ucs2', 'UCS2', 'utf16le', 'UTF16LE',
'binary', 'BINARY', 'latin1', 'base64', 'BASE64',
- 'hex', 'HEX', 'foo', 'undefined'
+ 'hex', 'HEX', 'foo', 'undefined',
];
const bench = common.createBenchmark(main, {