diff options
author | Rich Trott <rtrott@gmail.com> | 2019-02-04 22:06:08 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-02-06 22:18:31 -0800 |
commit | 29e74d4952b772f7f1bf51e1a8f1665bbbde39d1 (patch) | |
tree | 211a7131ae8f0fa7d8d5f65422cd53ad0741de33 /benchmark/string_decoder | |
parent | d310d8df62f9c05d07e68c4177f225e9dda72271 (diff) | |
download | android-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/string_decoder')
-rw-r--r-- | benchmark/string_decoder/string-decoder-create.js | 2 | ||||
-rw-r--r-- | benchmark/string_decoder/string-decoder.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/string_decoder/string-decoder-create.js b/benchmark/string_decoder/string-decoder-create.js index 386f99e7c0..fad727222e 100644 --- a/benchmark/string_decoder/string-decoder-create.js +++ b/benchmark/string_decoder/string-decoder-create.js @@ -4,7 +4,7 @@ const StringDecoder = require('string_decoder').StringDecoder; const bench = common.createBenchmark(main, { encoding: [ - 'ascii', 'utf8', 'utf-8', 'base64', 'ucs2', 'UTF-8', 'AscII', 'UTF-16LE' + 'ascii', 'utf8', 'utf-8', 'base64', 'ucs2', 'UTF-8', 'AscII', 'UTF-16LE', ], n: [25e6] }); diff --git a/benchmark/string_decoder/string-decoder.js b/benchmark/string_decoder/string-decoder.js index 95baa893bb..0e34effbc7 100644 --- a/benchmark/string_decoder/string-decoder.js +++ b/benchmark/string_decoder/string-decoder.js @@ -54,7 +54,7 @@ function main({ encoding, inLen, chunkLen, n }) { } str = Buffer.concat([ str, - buf.slice(start % buf.length, end % buf.length) + buf.slice(start % buf.length, end % buf.length), ]); } } |