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

Function toKeyValue

lib/test/angular/1.8.0/angular.js:1575–1589  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

1573}
1574
1575function toKeyValue(obj) {
1576 var parts = [];
1577 forEach(obj, function(value, key) {
1578 if (isArray(value)) {
1579 forEach(value, function(arrayValue) {
1580 parts.push(encodeUriQuery(key, true) +
1581 (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
1582 });
1583 } else {
1584 parts.push(encodeUriQuery(key, true) +
1585 (value === true ? '' : '=' + encodeUriQuery(value, true)));
1586 }
1587 });
1588 return parts.length ? parts.join('&') : '';
1589}
1590
1591
1592/**

Callers 1

normalizePathFunction · 0.70

Calls 3

forEachFunction · 0.70
isArrayFunction · 0.70
encodeUriQueryFunction · 0.70

Tested by

no test coverage detected