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

Allow side effects in link.update( ) #4

Closed
gaperton opened this issue May 5, 2016 · 1 comment
Closed

Allow side effects in link.update( ) #4

gaperton opened this issue May 5, 2016 · 1 comment

Comments

@gaperton
Copy link

gaperton commented May 5, 2016

When you update the link to object or array, you still have to return the value.

link.update( obj => { delete obj[ key ]; return obj; } )

Which is not good. Stupid code is always not good. It should look (and still work) like this:

link.update( obj => delete obj[ key ]  )

Then it will be perfect. In the next minor version.

@gaperton
Copy link
Author

Looks like it's impossible (or very hard) to do. Implemented proxy array and object methods instead in 1.3

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

1 participant