(obj)
| 1225 | } |
| 1226 | |
| 1227 | function toKeyValue(obj) { |
| 1228 | var parts = []; |
| 1229 | forEach(obj, function(value, key) { |
| 1230 | if (isArray(value)) { |
| 1231 | forEach(value, function(arrayValue) { |
| 1232 | parts.push(encodeUriQuery(key, true) + |
| 1233 | (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); |
| 1234 | }); |
| 1235 | } else { |
| 1236 | parts.push(encodeUriQuery(key, true) + |
| 1237 | (value === true ? '' : '=' + encodeUriQuery(value, true))); |
| 1238 | } |
| 1239 | }); |
| 1240 | return parts.length ? parts.join('&') : ''; |
| 1241 | } |
| 1242 | |
| 1243 | |
| 1244 | /** |
no test coverage detected