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
Use matcher inside Array.filter function ['a','b','c'].filter(mm.matcher('b')); …
['a','b','c'].filter(mm.matcher('b'));
Array is not filtered Result should be ['b'] …
Array should be filtered Result is ['b', 'c'] …
Array.filter gives value and index as arguments, so it gives matcher function the index as returnedObject value
The text was updated successfully, but these errors were encountered:
Do:
const matcher = mm.matcher('b'); ['a','b','c'].filter(input => matcher(input)));
Sorry, something went wrong.
This is a good workaround but shouldn't it work as mm.filter that was deleted from previous versions ?
No, there was no promise of parity with .filter().
.filter()
No branches or pull requests
Please describe the minimum necessary steps to reproduce this issue:
Use matcher inside Array.filter function
['a','b','c'].filter(mm.matcher('b'));
…
What is happening that shouldn't be?
Array is not filtered
Result should be ['b']
…
What should be happening instead?
Array should be filtered
Result is ['b', 'c']
…
Array.filter gives value and index as arguments, so it gives matcher function the index as returnedObject value
The text was updated successfully, but these errors were encountered: