You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/jQuery.extend.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@
37
37
<p>The merge performed by <code>$.extend()</code> is not recursive by default; if a property of the first object is itself an object or array, it will be completely overwritten by a property with the same key in the second or subsequent object. The values are not merged. This can be seen in the example below by examining the value of banana. However, by passing <code>true</code> for the first function argument, objects will be recursively merged.</p>
38
38
<p><strong>Warning</strong>: Passing <code>false</code> for the first argument is not supported.</p>
39
39
<p>Undefined properties are not copied. However, properties inherited from the object's prototype <em>will</em> be copied over. Properties that are an object constructed via <code>new MyCustomObject(args)</code>, or built-in JavaScript types such as Date or RegExp, are not re-constructed and will appear as plain Objects in the resulting object or array.</p>
40
-
<p>On a <code>deep</code> extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not.</p>
41
-
<p>For needs that fall outside of this behavior, write a custom extend method instead. </p>
40
+
<p>On a <code>deep</code> extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not. Deep-extending a cyclical data structure will result in an error.</p>
41
+
<p>For needs that fall outside of this behavior, write a custom extend method instead, or use a library like <ahref="http://lodash.com">lodash</a>. </p>
42
42
</longdesc>
43
43
<example>
44
44
<desc>Merge two objects, modifying the first.</desc>
0 commit comments