MCPcopy Index your code
hub / github.com/nodejs/node / getParams

Function getParams

benchmark/url/url-searchparams-sort.js:19–25  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

17};
18
19function getParams(str) {
20 const out = [];
21 for (const key of str.split('&')) {
22 out.push(key, '');
23 }
24 return out;
25}
26
27const bench = common.createBenchmark(main, {
28 type: Object.keys(inputs),

Callers 1

mainFunction · 0.85

Calls 2

splitMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected