(obj)
| 1565 | } |
| 1566 | |
| 1567 | function toKeyValue(obj) { |
| 1568 | var parts = []; |
| 1569 | forEach(obj, function(value, key) { |
| 1570 | if (isArray(value)) { |
| 1571 | forEach(value, function(arrayValue) { |
| 1572 | parts.push(encodeUriQuery(key, true) + |
| 1573 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1574 | }); |
| 1575 | } else { |
| 1576 | parts.push(encodeUriQuery(key, true) + |
| 1577 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1578 | } |
| 1579 | }); |
| 1580 | return parts.length ? parts.join('&') : ''; |
| 1581 | } |
| 1582 | |
| 1583 | |
| 1584 | /** |
no test coverage detected