Closed stoeffel closed 7 years ago
don't know what's up with travis 🤔.
Also, regarding the name: I agree. What about keep
?
The build was failing on travis due to the infamous caching issue. Cleaned caches and rebuilt
I like keep
. would you be okay with renaming and taking one selector?
That looks good to me 👍 One thought - how often have you needed to do the opposite? e.g exclude a given selector from a collection?
One thought - how often have you needed to do the opposite? e.g exclude a given selector from a collection?
I didn't have to do that yet, but I can see a use-case for that. We could add drop
in the future.
Let's just merge this for now and see how we go 👍
published with v5.1.0
We often have the use-case where we want to findAll elements with a certain class and then narrowing the search result to a specific subset. We use
index
to find the right element, but I think those tests tend to be pretty brittle. I think it's better to narrow the results with an actual selector. I chosefilterMap
as the name for this function, but I'm not super happy with it. I hadfindAllIn
before, which I think is worse.How do you like this?