mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Reduce code samples for _.assign and _.defaults. [ci skip]
This commit is contained in:
@@ -5226,8 +5226,7 @@
|
|||||||
* return typeof a == 'undefined' ? b : a;
|
* return typeof a == 'undefined' ? b : a;
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* var object = { 'name': 'barney' };
|
* defaults({ 'name': 'barney' }, { 'name': 'fred', 'employer': 'slate' });
|
||||||
* defaults(object, { 'name': 'fred', 'employer': 'slate' });
|
|
||||||
* // => { 'name': 'barney', 'employer': 'slate' }
|
* // => { 'name': 'barney', 'employer': 'slate' }
|
||||||
*/
|
*/
|
||||||
function assign(object, source, guard) {
|
function assign(object, source, guard) {
|
||||||
@@ -5424,8 +5423,7 @@
|
|||||||
* @returns {Object} Returns the destination object.
|
* @returns {Object} Returns the destination object.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var object = { 'name': 'barney' };
|
* _.defaults({ 'name': 'barney' }, { 'name': 'fred', 'employer': 'slate' });
|
||||||
* _.defaults(object, { 'name': 'fred', 'employer': 'slate' });
|
|
||||||
* // => { 'name': 'barney', 'employer': 'slate' }
|
* // => { 'name': 'barney', 'employer': 'slate' }
|
||||||
*/
|
*/
|
||||||
function defaults(object, source, guard) {
|
function defaults(object, source, guard) {
|
||||||
|
|||||||
Reference in New Issue
Block a user