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

Function ajaxExtend

static/wangEditor/js/lib/jquery-2.2.1.js:8088–8102  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

8086// that takes "flat" options (not to be deep extended)
8087// Fixes #9887
8088function ajaxExtend( target, src ) {
8089 var key, deep,
8090 flatOptions = jQuery.ajaxSettings.flatOptions || {};
8091
8092 for ( key in src ) {
8093 if ( src[ key ] !== undefined ) {
8094 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
8095 }
8096 }
8097 if ( deep ) {
8098 jQuery.extend( true, target, deep );
8099 }
8100
8101 return target;
8102}
8103
8104/* Handles responses to an ajax request:
8105 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

jquery-2.2.1.jsFile · 0.70

Calls 1

extendMethod · 0.80

Tested by

no test coverage detected