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
Using matcher inside Array.filter doesn't work #206
Comments
Do: const matcher = mm.matcher('b');
['a','b','c'].filter(input => matcher(input))); |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: