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