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

Document that over* methods accept matches* shortcuts #4510

Closed
arty-name opened this issue Oct 9, 2019 · 2 comments
Closed

Document that over* methods accept matches* shortcuts #4510

arty-name opened this issue Oct 9, 2019 · 2 comments

Comments

@arty-name
Copy link

I was pleasantly surprised that filter and others can use multiple matchers thanks to over* functions:

_.filter(input, _.overSome([
    _.matches({'a': 1}),
    _.matches({'a': 2}),
]))

Thanks to #2193 this becomes even better:

_.filter(input, _.overSome([
    {'a': 1},
    {'a': 2},
]))

However that last improvement seems to be undocumented. Could you please document this possibility for over* functions? Referring to them in the matches documentation could be the cherry on top.

@jdalton
Copy link
Member

jdalton commented Oct 9, 2019

If you're up for making a PR that would rock. You can do it against the 4.17.15-post branch and modify the lodash.js in the root of the repo with the documentation inline in the source.

@arty-name
Copy link
Author

Here you go!

This was referenced Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants