MCPcopy Create free account
hub / github.com/TruthHun/BookStack / ajaxExtend

Function ajaxExtend

static/jquery/1.12.4/jquery.js:9178–9192  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

9176// that takes "flat" options (not to be deep extended)
9177// Fixes #9887
9178function ajaxExtend( target, src ) {
9179 var deep, key,
9180 flatOptions = jQuery.ajaxSettings.flatOptions || {};
9181
9182 for ( key in src ) {
9183 if ( src[ key ] !== undefined ) {
9184 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
9185 }
9186 }
9187 if ( deep ) {
9188 jQuery.extend( true, target, deep );
9189 }
9190
9191 return target;
9192}
9193
9194/* Handles responses to an ajax request:
9195 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

jquery.jsFile · 0.70

Calls 1

extendMethod · 0.80

Tested by

no test coverage detected