diff options
author | Timothy Gu <timothygu99@gmail.com> | 2017-02-02 02:59:16 +0300 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2017-02-03 23:23:30 +0300 |
commit | 590626ba11ecb68c53a8091c74b6bd098d944203 (patch) | |
tree | 94578e3f58e99801381a01ad4044e22da84bca84 /benchmark | |
parent | 7cd6a7ddcb006ff8c36bc2abe0a545167dd56dac (diff) |
benchmark: simplify URLSearchParams import
PR-URL: https://github.com/nodejs/node/pull/11111
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/url/url-searchparams-iteration.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-parse.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-read.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-stringifier.js | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/url/url-searchparams-iteration.js b/benchmark/url/url-searchparams-iteration.js index caa4e45c412..833271ef306 100644 --- a/benchmark/url/url-searchparams-iteration.js +++ b/benchmark/url/url-searchparams-iteration.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common.js'); const assert = require('assert'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const bench = common.createBenchmark(main, { method: ['forEach', 'iterator'], diff --git a/benchmark/url/url-searchparams-parse.js b/benchmark/url/url-searchparams-parse.js index 61796a7d327..c156e452e1b 100644 --- a/benchmark/url/url-searchparams-parse.js +++ b/benchmark/url/url-searchparams-parse.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../common.js'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const inputs = { noencode: 'foo=bar&baz=quux&xyzzy=thud', diff --git a/benchmark/url/url-searchparams-read.js b/benchmark/url/url-searchparams-read.js index 4cee49c74d2..94ddaf1cfa4 100644 --- a/benchmark/url/url-searchparams-read.js +++ b/benchmark/url/url-searchparams-read.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../common.js'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const bench = common.createBenchmark(main, { method: ['get', 'getAll', 'has'], diff --git a/benchmark/url/url-searchparams-stringifier.js b/benchmark/url/url-searchparams-stringifier.js index 2979064b322..1a2f6777276 100644 --- a/benchmark/url/url-searchparams-stringifier.js +++ b/benchmark/url/url-searchparams-stringifier.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common.js'); const Buffer = require('buffer').Buffer; -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const inputs = { noencode: 'foo=bar&baz=quux&xyzzy=thud', |