mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Add ES6 _.assign alias of _.extend.
Former-commit-id: 20a0e0d295cb90a1756a5831b0b6684b97477170
This commit is contained in:
@@ -430,10 +430,10 @@
|
||||
/** Reusable iterator options for `defaults`, and `extend` */
|
||||
var extendIteratorOptions = {
|
||||
'useHas': false,
|
||||
'args': 'object',
|
||||
'args': 'object, source, guard',
|
||||
'top':
|
||||
'for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
|
||||
' if (iteratee = arguments[argsIndex]) {',
|
||||
'for (var argsIndex = 1, argsLength = typeof guard == \'number\' ? 2 : arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
|
||||
' if ((iteratee = arguments[argsIndex])) {',
|
||||
'objectLoop': 'result[index] = value',
|
||||
'bottom': ' }\n}'
|
||||
};
|
||||
@@ -987,6 +987,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias assign
|
||||
* @category Objects
|
||||
* @param {Object} object The destination object.
|
||||
* @param {Object} [source1, source2, ...] The source objects.
|
||||
@@ -4176,6 +4177,7 @@
|
||||
// assign aliases
|
||||
lodash.all = every;
|
||||
lodash.any = some;
|
||||
lodash.assign = extend;
|
||||
lodash.collect = map;
|
||||
lodash.detect = find;
|
||||
lodash.drop = rest;
|
||||
|
||||
Reference in New Issue
Block a user