MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / ajaxExtend

Function ajaxExtend

notes/docsify/unpkg/gotop/jquery-2.1.0.js:7565–7579  ·  view source on GitHub ↗
( target, src )

Source from the content-addressed store, hash-verified

7563// that takes "flat" options (not to be deep extended)
7564// Fixes #9887
7565function ajaxExtend( target, src ) {
7566 var key, deep,
7567 flatOptions = jQuery.ajaxSettings.flatOptions || {};
7568
7569 for ( key in src ) {
7570 if ( src[ key ] !== undefined ) {
7571 ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
7572 }
7573 }
7574 if ( deep ) {
7575 jQuery.extend( true, target, deep );
7576 }
7577
7578 return target;
7579}
7580
7581/* Handles responses to an ajax request:
7582 * - finds the right dataType (mediates between content-type and expected dataType)

Callers 1

jquery-2.1.0.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected