(obj)
| 1218 | } |
| 1219 | |
| 1220 | function toKeyValue(obj) { |
| 1221 | var parts = []; |
| 1222 | forEach(obj, function(value, key) { |
| 1223 | if (isArray(value)) { |
| 1224 | forEach(value, function(arrayValue) { |
| 1225 | parts.push(encodeUriQuery(key, true) + |
| 1226 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1227 | }); |
| 1228 | } else { |
| 1229 | parts.push(encodeUriQuery(key, true) + |
| 1230 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1231 | } |
| 1232 | }); |
| 1233 | return parts.length ? parts.join('&') : ''; |
| 1234 | } |
| 1235 | |
| 1236 | |
| 1237 | /** |
no test coverage detected