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

Allow for callback filter function in Collection.remove() #2398

Closed
parisholley opened this issue Nov 10, 2021 · 0 comments
Closed

Allow for callback filter function in Collection.remove() #2398

parisholley opened this issue Nov 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@parisholley
Copy link
Contributor

Today, you have to do:

for(const item of entity.items){
  if(i.version === 1){
    entity.items.remove(item);
  }
}

This could be streamlined as

entity.items.remove(i => i.version = 1);
@parisholley parisholley added the enhancement New feature or request label Nov 10, 2021
@B4nan B4nan closed this as completed in 0b37654 Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant