summaryrefslogtreecommitdiff
path: root/benchmark/http
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-08-06 13:01:30 -0700
committerRich Trott <rtrott@gmail.com>2016-08-09 14:40:01 -0700
commitae25ed3ccd8e5be2eb172af330f037fc06b4e6c9 (patch)
tree401bd33a2d6bf3b65371d19cb83a16e7873ac342 /benchmark/http
parentb7a8a691b4c6ff0f89b5d8dba3184eaef0efc898 (diff)
downloadandroid-node-v8-ae25ed3ccd8e5be2eb172af330f037fc06b4e6c9.tar.gz
android-node-v8-ae25ed3ccd8e5be2eb172af330f037fc06b4e6c9.tar.bz2
android-node-v8-ae25ed3ccd8e5be2eb172af330f037fc06b4e6c9.zip
benchmark: favor === over ==
Refs: https://github.com/nodejs/node/pull/7961#discussion_r73788501 PR-URL: https://github.com/nodejs/node/pull/8000 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'benchmark/http')
-rw-r--r--benchmark/http/_http_simple.js12
1 files changed, 6 insertions, 6 deletions
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);