MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / serialize

Function serialize

06.Router/basic/js/vue-resource.js:711–733  ·  view source on GitHub ↗
(params, obj, scope)

Source from the content-addressed store, hash-verified

709 }
710
711 function serialize(params, obj, scope) {
712
713 var array = isArray(obj),
714 plain = isPlainObject(obj),
715 hash;
716
717 each(obj, function (value, key) {
718
719 hash = isObject(value) || isArray(value);
720
721 if (scope) {
722 key = scope + '[' + (plain || hash ? key : '') + ']';
723 }
724
725 if (!scope && array) {
726 params.add(value.name, value.value);
727 } else if (hash) {
728 serialize(params, value, key);
729 } else {
730 params.add(key, value);
731 }
732 });
733 }
734
735 function xdrClient (request) {
736 return new Promise$1(function (resolve) {

Callers 1

vue-resource.jsFile · 0.70

Calls 4

isArrayFunction · 0.85
isPlainObjectFunction · 0.70
eachFunction · 0.70
isObjectFunction · 0.70

Tested by

no test coverage detected