(obj)
| 1445 | } |
| 1446 | |
| 1447 | function toKeyValue(obj) { |
| 1448 | var parts = []; |
| 1449 | forEach(obj, function(value, key) { |
| 1450 | if (isArray(value)) { |
| 1451 | forEach(value, function(arrayValue) { |
| 1452 | parts.push(encodeUriQuery(key, true) + |
| 1453 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1454 | }); |
| 1455 | } else { |
| 1456 | parts.push(encodeUriQuery(key, true) + |
| 1457 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1458 | } |
| 1459 | }); |
| 1460 | return parts.length ? parts.join('&') : ''; |
| 1461 | } |
| 1462 | |
| 1463 | |
| 1464 | /** |
no test coverage detected