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

Function serialize

lib/test/angular/1.5.0/angular.js:10104–10120  ·  view source on GitHub ↗
(toSerialize, prefix, topLevel)

Source from the content-addressed store, hash-verified

10102 return parts.join('&');
10103
10104 function serialize(toSerialize, prefix, topLevel) {
10105 if (toSerialize === null || isUndefined(toSerialize)) return;
10106 if (isArray(toSerialize)) {
10107 forEach(toSerialize, function(value, index) {
10108 serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
10109 });
10110 } else if (isObject(toSerialize) && !isDate(toSerialize)) {
10111 forEachSorted(toSerialize, function(value, key) {
10112 serialize(value, prefix +
10113 (topLevel ? '' : '[') +
10114 key +
10115 (topLevel ? '' : ']'));
10116 });
10117 } else {
10118 parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
10119 }
10120 }
10121 };
10122 };
10123}

Callers 1

Calls 8

isUndefinedFunction · 0.70
forEachFunction · 0.70
isObjectFunction · 0.70
isDateFunction · 0.70
forEachSortedFunction · 0.70
encodeUriQueryFunction · 0.70
serializeValueFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected