1'use strict'; 2const common = require('../common.js'); 3const querystring = require('querystring'); 4 5const bench = common.createBenchmark(main, { 6 input: [ 7 'there is nothing to unescape here', 8 'there%20are%20several%20spaces%20that%20need%20to%20be%20unescaped', 9 'there%2Qare%0-fake%escaped values in%%%%this%9Hstring', 10 '%20%21%22%23%24%25%26%27%28%29%2A%2B%2C%2D%2E%2F%30%31%32%33%34%35%36%37', 11 ], 12 n: [10e6], 13}); 14 15function main({ input, n }) { 16 bench.start(); 17 for (let i = 0; i < n; i += 1) 18 querystring.unescapeBuffer(input); 19 bench.end(n); 20} 21