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

Improvements to the hasDirectives utility function #10082

Merged
merged 4 commits into from
Sep 12, 2022

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Sep 8, 2022

The hasDirectives utility function is ambiguously named, since it behaves as if it was named hasAnyDirectives, even though one could also imagine wanting to check that all the provided directives are present, which calls for a name like hasAllDirectives. This PR introduces those two helper functions and adds a bunch of unit tests.

This PR builds on the optimization of hasDirectives that I began in #10018 with commit 6d3ad04, though it seemed sufficiently unrelated to that PR to be worth separating out into a second PR.

@benjamn benjamn force-pushed the utilities/hasAnyDirectives-and-hasAllDirectives branch from 2812d5e to 2c854b0 Compare September 12, 2022 17:20
@benjamn benjamn merged commit c26c0e1 into release-3.7 Sep 12, 2022
@benjamn benjamn deleted the utilities/hasAnyDirectives-and-hasAllDirectives branch September 12, 2022 17:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants