MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / toKeyValue

Function toKeyValue

lib/test/angular/1.4.3/angular.js:1323–1337  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1321}
1322
1323function toKeyValue(obj) {
1324 var parts = [];
1325 forEach(obj, function(value, key) {
1326 if (isArray(value)) {
1327 forEach(value, function(arrayValue) {
1328 parts.push(encodeUriQuery(key, true) +
1329 (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
1330 });
1331 } else {
1332 parts.push(encodeUriQuery(key, true) +
1333 (value === true ? '' : '=' + encodeUriQuery(value, true)));
1334 }
1335 });
1336 return parts.length ? parts.join('&') : '';
1337}
1338
1339
1340/**

Callers 3

LocationHtml5UrlFunction · 0.70
LocationHashbangUrlFunction · 0.70

Calls 3

forEachFunction · 0.70
encodeUriQueryFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected