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

feat: add support for multiple filters #26

Merged
merged 1 commit into from
May 15, 2020
Merged

feat: add support for multiple filters #26

merged 1 commit into from
May 15, 2020

Conversation

thecodrr
Copy link
Owner

It is now possible to add multiple filters like:

new fdir().filter(p => p.endsWith(".js")).filter(p => p.startsWith(".nim"))

Obviously, you can also do that in a single filter but I think it allows for better readability. The performance hit is also negligible.

@thecodrr thecodrr merged commit d349ed7 into master May 15, 2020
@kwaping
Copy link

kwaping commented Jul 7, 2020

It looks like you decided to implement this as an OR join on the filters. I was trying to use multiple filters in an AND fashion, so that each successive .filter() would further refine the list.

Would it be possible to change the implementation, or add this type of AND filtering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants