-
Notifications
You must be signed in to change notification settings - Fork 181
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
Introduce ApplyWithOptions #118
Introduce ApplyWithOptions #118
Conversation
* Implement ApplyWithOptions * Implement ApplyWithOptions unit tests * Fix compareJSON to allow comparison of array containers * Fix previously incorrect "copy" operation tests
Hi @evanphx, Any feedback? |
Hi! Sorry for the delay. I think my main feedback is that we should pass the opts struct down into the methods that have these options, rather than reading it at the top as arguments. The reason here is I can see the next person come along and want to add another option and they'll end up adding another argument unless they can just use the opts struct directly. Does that make sense? |
Hi - thanks for the feedback. The main reason I chose to pass explicit parameters was that technically this is cleaner as each private method gets to maintain its independence from the bigger picture (Apply). That said, I know I’m that “next person” 🙂 - I need yet another option for more “forgiving” add operations. I will switch to passing the options struct to the private methods. |
@evanphx - I switched to passing options to private methods. |
Thanks a bunch @vassilvk! |
Would it be possible to create a new release with this? 🙏 |
@AkihiroSuda This went out in v5.2.0. Sorry for the delay! |
Thanks! |
Closes #117.