Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties containing functions aren't replaced like numbers and other data types #3

Open
guiprav opened this issue Aug 25, 2016 · 2 comments

Comments

@guiprav
Copy link

guiprav commented Aug 25, 2016

  • 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
@jonschlinkert
Copy link
Owner

Should the title say something about "expected result?" or do you want to show where specifically the code is "handling something" improperly?

@guiprav
Copy link
Author

guiprav commented Aug 25, 2016

Was the comparison between the behavior of a property containing a function vs a number unclear?

@guiprav guiprav changed the title Properties containing functions aren't handled properly Properties containing functions aren't replaced like numbers and other data types Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants