(obj)
| 1572 | } |
| 1573 | |
| 1574 | function toKeyValue(obj) { |
| 1575 | var parts = []; |
| 1576 | forEach(obj, function(value, key) { |
| 1577 | if (isArray(value)) { |
| 1578 | forEach(value, function(arrayValue) { |
| 1579 | parts.push(encodeUriQuery(key, true) + |
| 1580 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1581 | }); |
| 1582 | } else { |
| 1583 | parts.push(encodeUriQuery(key, true) + |
| 1584 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1585 | } |
| 1586 | }); |
| 1587 | return parts.length ? parts.join('&') : ''; |
| 1588 | } |
| 1589 | |
| 1590 | |
| 1591 | /** |
no test coverage detected