()
| 207 | } |
| 208 | |
| 209 | toString() { |
| 210 | this.#parse(); |
| 211 | let ret = ''; |
| 212 | for (const { 0: key, 1: value } of this.#data) { |
| 213 | const encoded = encode(value); |
| 214 | // Ensure they are separated |
| 215 | if (ret.length) ret += ';'; |
| 216 | ret += `${key}=${encoded}`; |
| 217 | } |
| 218 | return ret; |
| 219 | } |
| 220 | |
| 221 | // Used to act as a friendly class to stringifying stuff |
| 222 | // not meant to be exposed to users, could inject invalid values |