summaryrefslogtreecommitdiff
path: root/benchmark/url/legacy-vs-whatwg-url-get-prop.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/url/legacy-vs-whatwg-url-get-prop.js')
-rw-r--r--benchmark/url/legacy-vs-whatwg-url-get-prop.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/url/legacy-vs-whatwg-url-get-prop.js b/benchmark/url/legacy-vs-whatwg-url-get-prop.js
index 733a05a173..229a4e6065 100644
--- a/benchmark/url/legacy-vs-whatwg-url-get-prop.js
+++ b/benchmark/url/legacy-vs-whatwg-url-get-prop.js
@@ -16,8 +16,8 @@ const bench = common.createBenchmark(main, {
// remains a constant in the function, so here we must use the literal
// instead to get a LoadNamedField.
function useLegacy(n, input) {
- var obj = url.parse(input);
- var noDead = {
+ const obj = url.parse(input);
+ const noDead = {
protocol: obj.protocol,
auth: obj.auth,
host: obj.host,
@@ -45,8 +45,8 @@ function useLegacy(n, input) {
}
function useWHATWG(n, input) {
- var obj = new URL(input);
- var noDead = {
+ const obj = new URL(input);
+ const noDead = {
protocol: obj.protocol,
auth: `${obj.username}:${obj.password}`,
host: obj.host,