We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const user1 = { name: 'Alice', email: '[email protected]' } const user2 = { name: 'Bob' } const user3 = { email: '[email protected]' } const users = [user1, user2, user3].filter(hasPresentKeys('name, 'email')) expect(users.length).toEqual(1) // only `user1`
Thoughts?
Could also consider a function like hasAtLeastOnePresentKey that behaves more like an || than an &&
hasAtLeastOnePresentKey
||
&&
The text was updated successfully, but these errors were encountered:
I have no intention to implement this at this point in time, but I do accept PRs. If you created a PR for hasPresentKeys I would certainly review it.
hasPresentKeys
Sorry, something went wrong.
Hey @robertmassaioli would you mind having a look at the proposed PR ?
No branches or pull requests
Thoughts?
Could also consider a function like
hasAtLeastOnePresentKey
that behaves more like an||
than an&&
The text was updated successfully, but these errors were encountered: