Replies: 1 comment 2 replies
-
IMHO it seems like premature optimization. How many entities do you have? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using the entity store, I have the need to check if there are any entities that match a predicate.
I would now like to check if any of the items are
favorite: true
I could use the
selectEntitiesCountByPredicate
but that means that it will loop through all entities, even if the first one is a favorite.I suggest we implement a new function that uses the
.some()
methodhttps://github.com/ngneat/elf/blob/master/packages/entities/src/lib/entity.utils.ts#L36
If I put together a PR, would this be something we could add?
Beta Was this translation helpful? Give feedback.
All reactions