(obj)
| 1321 | } |
| 1322 | |
| 1323 | function toKeyValue(obj) { |
| 1324 | var parts = []; |
| 1325 | forEach(obj, function(value, key) { |
| 1326 | if (isArray(value)) { |
| 1327 | forEach(value, function(arrayValue) { |
| 1328 | parts.push(encodeUriQuery(key, true) + |
| 1329 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1330 | }); |
| 1331 | } else { |
| 1332 | parts.push(encodeUriQuery(key, true) + |
| 1333 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1334 | } |
| 1335 | }); |
| 1336 | return parts.length ? parts.join('&') : ''; |
| 1337 | } |
| 1338 | |
| 1339 | |
| 1340 | /** |
no test coverage detected