We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you need to add multiple values, there is little sense in doing separate operations (and also creating intermediate objects) like:
const a = ImmutableMap([['x', 1], ['y', 2]]); const b = a.set('z', 3).set('t', 4);
It would be nice to have .extend method that would allow to do things like:
.extend
const a = ImmutableMap([['x', 1], ['y', 2]]); const b = a.extend({z: 3, t: 4}); // or a.extend(#{z: 3, t: 4});
The text was updated successfully, but these errors were encountered:
I believe this is something that can be handled by a merge operation. extend is surely confusing and hugely overloaded term.
merge
extend
Sorry, something went wrong.
@skrat merge also doesn't exist at the moment. I don't care whether it will be called merge, extend or assign, the functionality is what's interesting.
assign
I believe ideas is that spread operator will handle that:
const b = #{ ...a, z: 3, t: 4};
@Gozala: That applies to Record, not ImmutableMap.
Record
ImmutableMap
No branches or pull requests
When you need to add multiple values, there is little sense in doing separate operations (and also creating intermediate objects) like:
It would be nice to have
.extend
method that would allow to do things like:The text was updated successfully, but these errors were encountered: