MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / toKeyValue

Function toKeyValue

lib/test/angular/1.6.7/angular.js:1567–1581  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1565}
1566
1567function toKeyValue(obj) {
1568 var parts = [];
1569 forEach(obj, function(value, key) {
1570 if (isArray(value)) {
1571 forEach(value, function(arrayValue) {
1572 parts.push(encodeUriQuery(key, true) +
1573 (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
1574 });
1575 } else {
1576 parts.push(encodeUriQuery(key, true) +
1577 (value === true ? '' : '=' + encodeUriQuery(value, true)));
1578 }
1579 });
1580 return parts.length ? parts.join('&') : '';
1581}
1582
1583
1584/**

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