diff options
author | ka2jun8 <narchbald103@gmail.com> | 2018-11-24 10:40:56 +0300 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2018-11-28 03:25:33 +0300 |
commit | 8d550f78889038433e43bc2677c6d9b41ecbb6b9 (patch) | |
tree | 513f91f0a0510eb5a74382654b80422fae2428eb /doc/guides | |
parent | 657d7a5f9deeb8541c020b6b92d196dd854d47dd (diff) |
doc: replace anonymous function with arrow function
PR-URL: https://github.com/nodejs/node/pull/24617
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/guides')
-rw-r--r-- | doc/guides/writing-and-running-benchmarks.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/guides/writing-and-running-benchmarks.md b/doc/guides/writing-and-running-benchmarks.md index b6f8984afff..693107f4c22 100644 --- a/doc/guides/writing-and-running-benchmarks.md +++ b/doc/guides/writing-and-running-benchmarks.md @@ -444,14 +444,14 @@ function main(conf) { const http = require('http'); const len = conf.kb * 1024; const chunk = Buffer.alloc(len, 'x'); - const server = http.createServer(function(req, res) { + const server = http.createServer((req, res) => { res.end(chunk); }); - server.listen(common.PORT, function() { + server.listen(common.PORT, () => { bench.http({ connections: conf.connections, - }, function() { + }, () => { server.close(); }); }); |