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

Add map updateOrInsert to July 2019 Agenda #597

Merged
merged 1 commit into from Jul 11, 2019

Conversation

Projects
None yet
5 participants
@bmeck
Copy link
Member

commented Jul 11, 2019

No description provided.

@domenic

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Slides are currently private

@bmeck

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

woops, fixed

@zloirock

This comment has been minimized.

Copy link

commented Jul 11, 2019

Looks like an equal of Map.prototype.update from this proposal.

@bmeck

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

@zloirock that one doesn't switch on if the element is in the map or not

@zloirock

This comment has been minimized.

Copy link

commented Jul 11, 2019

So maybe makes sense to add it in the scope of the mentioned proposal?

@bmeck

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

@zloirock I don't want to hold up this method on all the other methods in the proposal you mentioned.

@ljharb ljharb force-pushed the bmeck:updateorinsert branch from f5e20e0 to 4d68b43 Jul 11, 2019

@ljharb

ljharb approved these changes Jul 11, 2019

@ljharb ljharb merged commit 4d68b43 into tc39:master Jul 11, 2019

@michaelficarra

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

@bmeck I think it would help the proposal if you include usage/popularity data from libraries that shows this is a very common need, especially given how easy it is for one to implement on their own.

@bmeck

This comment has been minimized.

Copy link
Member Author

commented Jul 12, 2019

@michaelficarra I can do some code searches, they have been more telling than library audits. It is simple to do these patterns so much that few libraries even in other languages seem to provide too much. People simply write if statements a lot. Usage % I have no clear way of measuring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.