Properties containing functions aren't replaced like numbers and other data types
guiprav opened this issue · comments
Gui Prá commented
- OS: Debian 9.
- Node version: 6.3.1.
- Library version: 3.0.0.
Why should properties containing functions behave differently from, say, numbers?
- Consider:
mergeDeep({ a: () => 1, b: () => 2 }, { b: () => 3, c: () => 4 }).b()
- Expected:
3
- Got:
2
vs.
- Consider:
mergeDeep({ a: 1, b: 2 }, { b: 3, c: 4 }).b
- Expected:
3
- Got:
3
Jon Schlinkert commented
Should the title say something about "expected result?" or do you want to show where specifically the code is "handling something" improperly?
Gui Prá commented
Was the comparison between the behavior of a property containing a function vs a number unclear?