* QueryString.escape() replaces encodeURIComponent() * @see https://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4 * @param {any} str * @returns {string}
(str)
| 161 | * @returns {string} |
| 162 | */ |
| 163 | function qsEscape(str) { |
| 164 | if (typeof str !== 'string') { |
| 165 | if (typeof str === 'object') |
| 166 | str = String(str); |
| 167 | else |
| 168 | str += ''; |
| 169 | } |
| 170 | |
| 171 | return encodeStr(str, noEscape, hexTable); |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * @param {string | number | bigint | boolean | symbol | undefined | null} v |