Allow _.mixin to accept a destination object as well as a source object.

Former-commit-id: 11ccb77653f017270c07579f59d75b847d4e6c65
This commit is contained in:
John-David Dalton
2013-07-18 08:12:14 -07:00
parent 9561414985
commit bb49b0c16a
3 changed files with 42 additions and 14 deletions

View File

@@ -153,7 +153,7 @@
'memoize': [],
'merge': ['createCallback', 'forEach', 'forOwn', 'getArray', 'isArray', 'isObject', 'isPlainObject', 'releaseArray'],
'min': ['basicEach', 'charAtCallback', 'createCallback', 'isArray', 'isString'],
'mixin': ['forEach', 'functions'],
'mixin': ['forEach', 'functions', 'isFunction'],
'noConflict': [],
'omit': ['basicFlatten', 'createCallback', 'forIn', 'getIndexOf'],
'once': [],
@@ -2716,6 +2716,9 @@
}
});
}
if (_.contains(plusFuncs, 'chain') == !isUnderscore) {
funcDependencyMap.mixin = _.without(funcDependencyMap.mixin, 'isFunction');
}
if (isUnderscore) {
if (!isLodash('clone') && !isLodash('cloneDeep')) {
funcDependencyMap.clone = _.without(funcDependencyMap.clone, 'forEach', 'forOwn');