MCPcopy Create free account
hub / github.com/JsAaron/jQuery / ajaxExtend

Function ajaxExtend

2.1.1/test/other.js:5043–5057  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

5041// that takes "flat" options (not to be deep extended)
5042// Fixes #9887
5043function ajaxExtend( target, src ) {
5044 var key, deep,
5045 flatOptions = jQuery.ajaxSettings.flatOptions || {};
5046
5047 for ( key in src ) {
5048 if ( src[ key ] !== undefined ) {
5049 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
5050 }
5051 }
5052 if ( deep ) {
5053 jQuery.extend( true, target, deep );
5054 }
5055
5056 return target;
5057}
5058
5059/* Handles responses to an ajax request:
5060 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

other.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected