-
Notifications
You must be signed in to change notification settings - Fork 11
enhance: _merge fix #187
base: master
Are you sure you want to change the base?
enhance: _merge fix #187
Conversation
| import _merge from '../_internal/_merge' | ||
|
|
||
| export default curry3(function mergeWith(cb, result) { | ||
| export default _curry2(function mergeWith(cb, result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works with 2+ arguments, so no need for curry3
|
|
||
| export default _curry3(function mergeDeepWithKey(func, left, right) { | ||
| return _merge(left, right, function(l, r, key) { | ||
| function mergeDeepWithKeyStrategy(l, r, key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anonymous function cannot be optimised in size
| export default _curry3(function mergeDeepWith(func, left, right) { | ||
| var cb = function(l, r) { | ||
| if (typeof l === 'object' && typeof r === 'object' && !Array.isArray(l)) return mergeDeepWith(func, l, r) | ||
| function mergeDeepWithStrategy(l, r) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created name for better debugging
| import mergeDeepLeft from '../mergeDeepLeft/mergeDeepLeft' | ||
| import _merge from '../_internal/_merge' | ||
|
|
||
| function mergeDeepRightStrategy(left, right) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created name for better debugging
| var cb = function(l, r) { | ||
| if (!Array.isArray(l) && typeof l === 'object' && typeof r === 'object') { | ||
| return mergeDeepLeft(l, r) | ||
| function mergeDeepLeftStrategy(left, right) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created name for better debugging
Changes: