MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / ajaxExtend

Function ajaxExtend

test/bower_components/jquery/src/ajax.js:109–123  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

107// that takes "flat" options (not to be deep extended)
108// Fixes #9887
109function ajaxExtend( target, src ) {
110 var key, deep,
111 flatOptions = jQuery.ajaxSettings.flatOptions || {};
112
113 for ( key in src ) {
114 if ( src[ key ] !== undefined ) {
115 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
116 }
117 }
118 if ( deep ) {
119 jQuery.extend( true, target, deep );
120 }
121
122 return target;
123}
124
125/* Handles responses to an ajax request:
126 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

ajax.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected