|
2 | 2 | import { Buffer } from "./buffer.ts"; |
3 | 3 | import { ERR_INVALID_URI } from "./_errors.ts"; |
4 | 4 |
|
5 | | -/******************** querystring.decode() ********************/ |
6 | | - |
7 | 5 | /** |
8 | 6 | * Alias of querystring.parse() |
9 | 7 | * @deprecated |
10 | 8 | */ |
11 | 9 | export const decode = parse; |
12 | 10 |
|
13 | | -/******************** querystring.encode() ********************/ |
14 | | - |
15 | 11 | /** |
16 | 12 | * Alias of querystring.stringify() |
17 | 13 | * @deprecated |
18 | 14 | */ |
19 | 15 | export const encode = stringify; |
20 | 16 |
|
21 | | -/******************** querystring.escape(str) ********************/ |
22 | | - |
23 | 17 | const hexTable = new Array(256); |
24 | 18 | for (let i = 0; i < 256; ++i) { |
25 | 19 | hexTable[i] = "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase(); |
@@ -107,8 +101,6 @@ function qsEscape(str: unknown): string { |
107 | 101 | */ |
108 | 102 | export const escape = qsEscape; |
109 | 103 |
|
110 | | -/******************** querystring.parse(str[, sep[, eq[, options]]]) ********************/ |
111 | | - |
112 | 104 | interface ParsedUrlQuery { |
113 | 105 | [key: string]: string | string[] | undefined; |
114 | 106 | } |
@@ -353,8 +345,6 @@ export function parse( |
353 | 345 | return obj; |
354 | 346 | } |
355 | 347 |
|
356 | | -/******************** querystring.stringify(obj[, sep[, eq[, options]]]) ********************/ |
357 | | - |
358 | 348 | interface StringifyOptions { |
359 | 349 | /** The function to use when converting URL-unsafe characters to percent-encoding in the query string. */ |
360 | 350 | encodeURIComponent: (string: string) => string; |
@@ -482,8 +472,6 @@ export function stringify( |
482 | 472 | return ""; |
483 | 473 | } |
484 | 474 |
|
485 | | -/******************** querystring.unescape(str) ********************/ |
486 | | - |
487 | 475 | // deno-fmt-ignore |
488 | 476 | const unhexTable = new Int8Array([ |
489 | 477 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 - 15 |
|
0 commit comments