8000 Absorb `copyObjectWith` into `copyObject`. · lodash/lodash@16ed081 · GitHub
[go: up one dir, main page]

Skip to content

Commit 16ed081

Browse files
committed
Absorb copyObjectWith into copyObject.
1 parent c38b4b2 commit 16ed081

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

lodash.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4174,24 +4174,10 @@
41744174
* @param {Object} source The object to copy properties from.
41754175
* @param {Array} props The property identifiers to copy.
41764176
* @param {Object} [object={}] The object to copy properties to.
4177-
* @returns {Object} Returns `object`.
4178-
*/
4179-
function copyObject(source, props, object) {
4180-
return copyObjectWith(source, props, object);
4181-
}
4182-
4183-
/**
4184-
* This function is like `copyObject` except that it accepts a function to
4185-
* customize copied values.
4186-
*
4187-
* @private
4188-
* @param {Object} source The object to copy properties from.
4189-
* @param {Array} props The property identifiers to copy.
4190-
* @param {Object} [object={}] The object to copy properties to.
41914177
* @param {Function} [customizer] The function to customize copied values.
41924178
* @returns {Object} Returns `object`.
41934179
*/
4194-
function copyObjectWith(source, props, object, customizer) {
4180+
function copyObject(source, props, object, customizer) {
41954181
object || (object = {});
41964182

41974183
var index = -1,
@@ -11669,7 +11655,7 @@
1166911655
* // => { 'a': 1, 'b': 2 }
1167011656
*/
1167111657
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
11672-
copyObjectWith(source, keysIn(source), object, customizer);
11658+
copyObject(source, keysIn(source), object, customizer);
1167311659
});
1167411660

1167511661
/**
@@ -11700,7 +11686,7 @@
1170011686
* // => { 'a': 1, 'b': 2 }
1170111687
*/
1170211688
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
11703-
copyObjectWith(source, keys(source), object, customizer);
11689+
copyObject(source, keys(source), object, customizer);
1170411690
});
1170511691

1170611692
/**

0 commit comments

Comments
 (0)
0