(obj)
| 1355 | } |
| 1356 | |
| 1357 | function toKeyValue(obj) { |
| 1358 | var parts = []; |
| 1359 | forEach(obj, |
| 1360 | function (value, key) { |
| 1361 | if (isArray(value)) { |
| 1362 | forEach(value, |
| 1363 | function (arrayValue) { |
| 1364 | parts.push(encodeUriQuery(key, true) + |
| 1365 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1366 | }); |
| 1367 | } else { |
| 1368 | parts.push(encodeUriQuery(key, true) + |
| 1369 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1370 | } |
| 1371 | }); |
| 1372 | return parts.length ? parts.join('&') : ''; |
| 1373 | } |
| 1374 | |
| 1375 | /** |
| 1376 | * We need our custom method because encodeURIComponent is too aggressive and doesn't follow |
no test coverage detected