(it = "", parts = null)
| 128 | #pairs = null; |
| 129 | #parts = null; |
| 130 | constructor(it = "", parts = null) { |
| 131 | if (typeof(it) == "object") { |
| 132 | this.#pairs = []; |
| 133 | if (Array.isArray(it)) { |
| 134 | for (let item of it) { |
| 135 | if (item.length != 2) |
| 136 | throw new TypeError("invalid parameter"); |
| 137 | this.append(item[0], item[1]); |
| 138 | } |
| 139 | } |
| 140 | else { |
| 141 | for (let name in it) |
| 142 | this.append(name, it[name]); |
| 143 | } |
| 144 | } |
| 145 | else { |
| 146 | this.#pairs = parseQuery(it); |
| 147 | this.#parts = parts; |
| 148 | } |
| 149 | } |
| 150 | get length() { |
| 151 | return this.#pairs.length; |
| 152 | } |
nothing calls this directly
no test coverage detected