(obj)
| 1128 | } |
| 1129 | |
| 1130 | function toKeyValue(obj) { |
| 1131 | var parts = []; |
| 1132 | forEach(obj, function(value, key) { |
| 1133 | if (isArray(value)) { |
| 1134 | forEach(value, function(arrayValue) { |
| 1135 | parts.push(encodeUriQuery(key, true) + |
| 1136 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1137 | }); |
| 1138 | } else { |
| 1139 | parts.push(encodeUriQuery(key, true) + |
| 1140 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1141 | } |
| 1142 | }); |
| 1143 | return parts.length ? parts.join('&') : ''; |
| 1144 | } |
| 1145 | |
| 1146 | |
| 1147 | /** |
no test coverage detected