diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-30 03:54:51 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-01-23 01:29:16 +0100 |
commit | 49f5e0818842740770fef1b25bca30c6dc826841 (patch) | |
tree | acdf9e9a7424898926383c3b2af399cad3d72ff5 /benchmark/url/url-format.js | |
parent | 366fd03af00407e9b45d91d9df66b3ab34b10f35 (diff) | |
download | android-node-v8-49f5e0818842740770fef1b25bca30c6dc826841.tar.gz android-node-v8-49f5e0818842740770fef1b25bca30c6dc826841.tar.bz2 android-node-v8-49f5e0818842740770fef1b25bca30c6dc826841.zip |
benchmark: (url) use destructuring
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/url/url-format.js')
-rw-r--r-- | benchmark/url/url-format.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js index dc8e020879..14696af8e3 100644 --- a/benchmark/url/url-format.js +++ b/benchmark/url/url-format.js @@ -12,10 +12,7 @@ const bench = common.createBenchmark(main, { n: [25e6] }); -function main(conf) { - const type = conf.type; - const n = conf.n | 0; - +function main({ type, n }) { const input = inputs[type] || ''; // Force-optimize url.format() so that the benchmark doesn't get |