MCPcopy Index your code
hub / github.com/shipshapecode/tether / buildParams

Function buildParams

docs/welcome/js/jquery.js:7368–7394  ·  view source on GitHub ↗
( prefix, obj, traditional, add )

Source from the content-addressed store, hash-verified

7366};
7367
7368function buildParams( prefix, obj, traditional, add ) {
7369 var name;
7370
7371 if ( jQuery.isArray( obj ) ) {
7372 // Serialize array item.
7373 jQuery.each( obj, function( i, v ) {
7374 if ( traditional || rbracket.test( prefix ) ) {
7375 // Treat each array item as a scalar.
7376 add( prefix, v );
7377
7378 } else {
7379 // Item is non-scalar (array or object), encode its numeric index.
7380 buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
7381 }
7382 });
7383
7384 } else if ( !traditional && jQuery.type( obj ) === "object" ) {
7385 // Serialize object item.
7386 for ( name in obj ) {
7387 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
7388 }
7389
7390 } else {
7391 // Serialize scalar item.
7392 add( prefix, obj );
7393 }
7394}
7395jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
7396 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
7397 "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {

Callers 1

jquery.jsFile · 0.85

Calls 1

addFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…