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

Function serialize

lib/test/angular/1.6.7/angular.js:11347–11363  ·  view source on GitHub ↗
(toSerialize, prefix, topLevel)

Source from the content-addressed store, hash-verified

11345 return parts.join('&');
11346
11347 function serialize(toSerialize, prefix, topLevel) {
11348 if (toSerialize === null || isUndefined(toSerialize)) return;
11349 if (isArray(toSerialize)) {
11350 forEach(toSerialize, function(value, index) {
11351 serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
11352 });
11353 } else if (isObject(toSerialize) && !isDate(toSerialize)) {
11354 forEachSorted(toSerialize, function(value, key) {
11355 serialize(value, prefix +
11356 (topLevel ? '' : '[') +
11357 key +
11358 (topLevel ? '' : ']'));
11359 });
11360 } else {
11361 parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
11362 }
11363 }
11364 };
11365 };
11366}

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