(obj)
| 1384 | } |
| 1385 | |
| 1386 | function toKeyValue(obj) { |
| 1387 | var parts = []; |
| 1388 | forEach(obj, function(value, key) { |
| 1389 | if (isArray(value)) { |
| 1390 | forEach(value, function(arrayValue) { |
| 1391 | parts.push(encodeUriQuery(key, true) + |
| 1392 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1393 | }); |
| 1394 | } else { |
| 1395 | parts.push(encodeUriQuery(key, true) + |
| 1396 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1397 | } |
| 1398 | }); |
| 1399 | return parts.length ? parts.join('&') : ''; |
| 1400 | } |
| 1401 | |
| 1402 | |
| 1403 | /** |
no test coverage detected