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

Function serialize

lib/test/angular/1.4.3/angular.js:9219–9235  ·  view source on GitHub ↗
(toSerialize, prefix, topLevel)

Source from the content-addressed store, hash-verified

9217 return parts.join('&');
9218
9219 function serialize(toSerialize, prefix, topLevel) {
9220 if (toSerialize === null || isUndefined(toSerialize)) return;
9221 if (isArray(toSerialize)) {
9222 forEach(toSerialize, function(value) {
9223 serialize(value, prefix + '[]');
9224 });
9225 } else if (isObject(toSerialize) && !isDate(toSerialize)) {
9226 forEachSorted(toSerialize, function(value, key) {
9227 serialize(value, prefix +
9228 (topLevel ? '' : '[') +
9229 key +
9230 (topLevel ? '' : ']'));
9231 });
9232 } else {
9233 parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
9234 }
9235 }
9236 };
9237 };
9238}

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