Skip to content

Commit 8d550f7

Browse files
ka2jun8rvagg
authored andcommitted
doc: replace anonymous function with arrow function
PR-URL: #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>
1 parent 657d7a5 commit 8d550f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/guides/writing-and-running-benchmarks.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,14 @@ function main(conf) {
444444
const http = require('http');
445445
const len = conf.kb * 1024;
446446
const chunk = Buffer.alloc(len, 'x');
447-
const server = http.createServer(function(req, res) {
447+
const server = http.createServer((req, res) => {
448448
res.end(chunk);
449449
});
450450

451-
server.listen(common.PORT, function() {
451+
server.listen(common.PORT, () => {
452452
bench.http({
453453
connections: conf.connections,
454-
}, function() {
454+
}, () => {
455455
server.close();
456456
});
457457
});

0 commit comments

Comments
 (0)