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