aboutsummaryrefslogtreecommitdiff
path: root/lib/internal/querystring.js
blob: 2f8d77d3e9d2e7d117b09afcfb101dceaadbd174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict';

const hexTable = new Array(256);
for (var i = 0; i < 256; ++i)
  hexTable[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();

// Instantiating this is faster than explicitly calling `Object.create(null)`
// to get a "clean" empty object (tested with v8 v4.9).
function StorageObject() {}
StorageObject.prototype = Object.create(null);

module.exports = {
  hexTable,
  StorageObject
};