mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Remove references to _.
This commit is contained in:
@@ -3,7 +3,7 @@ import createAssigner from './_createAssigner.js';
|
||||
import keys from './keys.js';
|
||||
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer`
|
||||
* This method is like `assign` except that it accepts `customizer`
|
||||
* which is invoked to produce the assigned values. If `customizer` returns
|
||||
* `undefined`, assignment is handled by the method instead. The `customizer`
|
||||
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
||||
@@ -11,21 +11,20 @@ import keys from './keys.js';
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} sources The source objects.
|
||||
* @param {Function} [customizer] The function to customize assigned values.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.assignInWith
|
||||
* @see assignInWith
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* return isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
* var defaults = partialRight(assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
|
||||
Reference in New Issue
Block a user