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

Comment about combined defaults and extend #4267

Conversation

jgonggrijp
Copy link
Collaborator

This proposal replaces #4088 by @unclechu. I squashed their commits and then changed the comment again in a commit of my own. In this way, @unclechu is still credited for their effort to document the code, although their PR will be marked as rejected.

In my opinion, the line in question was misguided (see also #4266). It has no advantage over a simple call to _.defaults, except that it allows you to set attribute keys that collide with Object.prototype properties. I consider that a footgun rather than a feature.

Reviews welcome.

@jgonggrijp jgonggrijp self-assigned this Jul 19, 2023
@jgonggrijp jgonggrijp added this to High priority in Dusting off Jul 20, 2023
@jgonggrijp jgonggrijp merged commit 4abcaa5 into jashkenas:master Jul 20, 2023
1 check passed
Dusting off automation moved this from High priority to Closed Jul 20, 2023
@jgonggrijp jgonggrijp deleted the feature/comment-about-combined-defaults-and-extend branch July 20, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants