|
24 | 24 | 'use strict';
|
25 | 25 |
|
26 | 26 | const { Buffer } = require('buffer');
|
27 |
| -const { StorageObject, hexTable } = require('internal/querystring'); |
| 27 | +const { |
| 28 | + StorageObject, |
| 29 | + hexTable, |
| 30 | + isHexTable |
| 31 | +} = require('internal/querystring'); |
28 | 32 | const QueryString = module.exports = {
|
29 | 33 | unescapeBuffer,
|
30 | 34 | // `unescape()` is a JS global, so we need to use a different local name
|
@@ -264,25 +268,6 @@ function stringify(obj, sep, eq, options) {
|
264 | 268 | return '';
|
265 | 269 | }
|
266 | 270 |
|
267 |
| -const isHexTable = [ |
268 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 |
269 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 |
270 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 32 - 47 |
271 |
| - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 |
272 |
| - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 64 - 79 |
273 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80 - 95 |
274 |
| - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 96 - 111 |
275 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 112 - 127 |
276 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 128 ... |
277 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
278 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
279 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
280 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
281 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
282 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
283 |
| - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // ... 256 |
284 |
| -]; |
285 |
| - |
286 | 271 | function charCodes(str) {
|
287 | 272 | if (str.length === 0) return [];
|
288 | 273 | if (str.length === 1) return [str.charCodeAt(0)];
|
|
0 commit comments