Skip to content

Conversation

D4rk1ink
Copy link

@D4rk1ink D4rk1ink commented Feb 1, 2021

No description provided.

@D4rk1ink
Copy link
Author

D4rk1ink commented Mar 4, 2021

Please approve this PR.

@podefr
Copy link
Member

podefr commented Mar 5, 2021

thanks, I appreciate your contribution and I like the idea of using a function for setting a property.
It seems that your changes cover the following uses cases:

  1. Setting a property at the root of the object set(obj, 'a', (value) => value * 2)
  2. Setting a nested property set(obj, 'a.b.c', (value) => value * 2)
  3. Setting the current object's prototype (not Object.prototype).

I think that your tests only verify that 2 and 3 work, but not 1. i.e we don't test this line: https://github.com/cosmosio/nested-property/pull/17/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R127 (127)

would you be able to add the appropriate test?
would you also be able to edit the README's documentation to show the new feature?

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants