(key, value, options)
| 33121 | return out; |
| 33122 | } |
| 33123 | function encodeLabel(key, value, options) { |
| 33124 | let out = ""; |
| 33125 | const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; |
| 33126 | const encodeString = (v5) => { |
| 33127 | return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; |
| 33128 | }; |
| 33129 | const encodeValue = (v5) => encodeString(serializeValue(v5)); |
| 33130 | pairs.forEach(([pk, pv]) => { |
| 33131 | let encValue = ""; |
| 33132 | if (pv === void 0) { |
| 33133 | return; |
| 33134 | } else if (Array.isArray(pv)) { |
| 33135 | encValue = mapDefined(pv, (v5) => `${encodeValue(v5)}`).join("."); |
| 33136 | } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { |
| 33137 | encValue = mapDefinedEntries(Object.entries(pv), ([k7, v5]) => { |
| 33138 | return `.${encodeString(k7)}.${encodeValue(v5)}`; |
| 33139 | }).join(""); |
| 33140 | encValue = encValue.slice(1); |
| 33141 | } else { |
| 33142 | const k7 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${encodeString(pk)}=` : ""; |
| 33143 | encValue = `${k7}${encodeValue(pv)}`; |
| 33144 | } |
| 33145 | out += `.${encValue}`; |
| 33146 | }); |
| 33147 | return out; |
| 33148 | } |
| 33149 | function formEncoder(sep) { |
| 33150 | return (key, value, options) => { |
| 33151 | let out = ""; |
nothing calls this directly
no test coverage detected
searching dependent graphs…