-
Notifications
You must be signed in to change notification settings - Fork 196
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
Make without
support removing item from an array
#239
Comments
I totally agree! Do you think it would also make sense to allow removing by value? const fruits = Immutable(['apple', 'banana', 'cherry']);
fruits.without('banana'); // ['apple', 'cherry'] |
No, because it leads to ambiguity:
|
Ok then, maybe it's a rabbit hole but it seems like most of the time, you would know the value but not the index. How about something like this? const fruits = Immutable(['apple', 'banana', 'cherry']);
fruits.without('banana', { byValue: true }); // ['apple', 'cherry'] |
@Aaronius @markhicken |
The
without
method allows a property to be a removed from an object. I propose that it should also allow an item to be removed from an array:The text was updated successfully, but these errors were encountered: