From ae25ed3ccd8e5be2eb172af330f037fc06b4e6c9 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Aug 2016 13:01:30 -0700 Subject: benchmark: favor === over == MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/pull/7961#discussion_r73788501 PR-URL: https://github.com/nodejs/node/pull/8000 Reviewed-By: Brian White Reviewed-By: Andreas Madsen Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Johan Bergström --- benchmark/http/_http_simple.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'benchmark/http') diff --git a/benchmark/http/_http_simple.js b/benchmark/http/_http_simple.js index 7e2eed53a1..1c965b21c1 100644 --- a/benchmark/http/_http_simple.js +++ b/benchmark/http/_http_simple.js @@ -37,7 +37,7 @@ var server = module.exports = http.createServer(function(req, res) { var status = 200; var n, i; - if (command == 'bytes') { + if (command === 'bytes') { n = ~~arg; if (n <= 0) throw new Error('bytes called with n <= 0'); @@ -46,7 +46,7 @@ var server = module.exports = http.createServer(function(req, res) { } body = storedBytes[n]; - } else if (command == 'buffer') { + } else if (command === 'buffer') { n = ~~arg; if (n <= 0) throw new Error('buffer called with n <= 0'); @@ -58,7 +58,7 @@ var server = module.exports = http.createServer(function(req, res) { } body = storedBuffer[n]; - } else if (command == 'unicode') { + } else if (command === 'unicode') { n = ~~arg; if (n <= 0) throw new Error('unicode called with n <= 0'); @@ -67,14 +67,14 @@ var server = module.exports = http.createServer(function(req, res) { } body = storedUnicode[n]; - } else if (command == 'quit') { + } else if (command === 'quit') { res.connection.server.close(); body = 'quitting'; - } else if (command == 'fixed') { + } else if (command === 'fixed') { body = fixed; - } else if (command == 'echo') { + } else if (command === 'echo') { res.writeHead(200, { 'Content-Type': 'text/plain', 'Transfer-Encoding': 'chunked' }); req.pipe(res); -- cgit v1.2.3