MCPcopy
hub / github.com/angular-ui/ui-grid / toKeyValue

Function toKeyValue

lib/test/angular/1.7.0/angular.js:1535–1549  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1533}
1534
1535function toKeyValue(obj) {
1536 var parts = [];
1537 forEach(obj, function(value, key) {
1538 if (isArray(value)) {
1539 forEach(value, function(arrayValue) {
1540 parts.push(encodeUriQuery(key, true) +
1541 (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
1542 });
1543 } else {
1544 parts.push(encodeUriQuery(key, true) +
1545 (value === true ? '' : '=' + encodeUriQuery(value, true)));
1546 }
1547 });
1548 return parts.length ? parts.join('&') : '';
1549}
1550
1551
1552/**

Callers 3

LocationHtml5UrlFunction · 0.70
LocationHashbangUrlFunction · 0.70

Calls 3

forEachFunction · 0.70
isArrayFunction · 0.70
encodeUriQueryFunction · 0.70

Tested by

no test coverage detected