Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-17 04:01:12 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-20 04:46:37 +0300
commit22aa3d48997f1fc31e9c9cc08ec76a5436c93fe3 (patch)
tree255361bcfb0611af60f6c7c101c886687d0ce047 /benchmark/url
parentbbbb1f60780d9b8ef812769e215be830c4d968b8 (diff)
benchmark: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12455 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/url')
-rw-r--r--benchmark/url/legacy-vs-whatwg-url-get-prop.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/url/legacy-vs-whatwg-url-get-prop.js b/benchmark/url/legacy-vs-whatwg-url-get-prop.js
index ffc8b4995df..733a05a1730 100644
--- a/benchmark/url/legacy-vs-whatwg-url-get-prop.js
+++ b/benchmark/url/legacy-vs-whatwg-url-get-prop.js
@@ -48,7 +48,7 @@ function useWHATWG(n, input) {
var obj = new URL(input);
var noDead = {
protocol: obj.protocol,
- auth: obj.username + ':' + obj.password,
+ auth: `${obj.username}:${obj.password}`,
host: obj.host,
hostname: obj.hostname,
port: obj.port,
@@ -59,7 +59,7 @@ function useWHATWG(n, input) {
bench.start();
for (var i = 0; i < n; i += 1) {
noDead.protocol = obj.protocol;
- noDead.auth = obj.username + ':' + obj.password;
+ noDead.auth = `${obj.username}:${obj.password}`;
noDead.host = obj.host;
noDead.hostname = obj.hostname;
noDead.port = obj.port;