ngneat / elf

🧙‍♀️ A Reactive Store with Magical Powers

Home Page:https://ngneat.github.io/elf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elf-entities does not seem to be exporting 'getManyByPredicate'

peternixey opened this issue · comments

Which @ngneat/elf-* package(s) are the source of the bug?

entities

Is this a regression?

No

Description

I can't seem to import the getManyByPredicate function in "@ngneat/elf-entities": "^4.6.0"

'"@ngneat/elf-entities"' has no exported member named 'getManyByPredicate'. Did you mean 'selectManyByPredicate'?

I've created a minimal StackBlitz here which illustrates the issue.

image

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-oazsvw?file=src%2Fmain.ts

Please provide the exception or error you saw

`getManyByPredicate` not being exported

Please provide the environment you discovered this bug in

"dependencies": {
    "@angular/core": "^14.2.3",
    ...
    "@ngneat/elf": "^2.4.0",
    "@ngneat/elf-entities": "^4.6.0",
    "@ngneat/elf-pagination": "^1.1.0",
    "@ngneat/elf-persist-state": "^1.2.0",
    "@ngneat/elf-requests": "^1.9.2",
    "@ngneat/elf-state-history": "^1.4.0",
  },


### Anything else?

_No response_

### Do you want to create a pull request?

No

We don't need this function, I'll remove it. Use getAllEntitiesApply with predicate.

Thanks Netanel. Out of interest - is doing a filter using the predicate much more efficient than just filtering the output of getAllEntities after the fact? I always try to use your methods but also sometimes it's cleaner to do it after the fact and so I wonder whether it's much less efficient...

2x calling filter vs x1

Not critical for most cases IMO

🙏🏻