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

find a new name #29

Closed
bmeck opened this issue Jul 22, 2020 · 7 comments
Closed

find a new name #29

bmeck opened this issue Jul 22, 2020 · 7 comments

Comments

@bmeck
Copy link
Member

bmeck commented Jul 22, 2020

No description provided.

@bmeck
Copy link
Member Author

bmeck commented Jul 22, 2020

Ideas:

Term Definition
requisition() "demand the performance or occurrence of."
ensure() "make certain of obtaining or providing (something)."
claim() "state or assert that something is the case"

@papb
Copy link

papb commented Jul 22, 2020

I like ensure 👍

@ljharb
Copy link
Member

ljharb commented Jul 22, 2020

insertOnDuplicateKeyUpdate is what mysql calls it; in https://www.npmjs.com/package/global-cache i called it setIfMissingThenGet.

Both names are descriptive and terrible. I'm not sure what short name will be descriptive and non-terrible, though :-/

@gibson042
Copy link

It might be possible to get away with just update, as in "update the map data".

  • handler-object style: map.update(key, { replace(oldValue, key, map){…}, add(key, map){…} })
  • callback style: map.update(key, (oldValue, key, map) => …, (key, map) => …)

@tubbo
Copy link

tubbo commented Oct 12, 2021

not sure what was wrong with upsert. mongodb calls it findAndModify() which i kinda like, but upsert() is less characters.

@dleeftink
Copy link

Possibly, a three letter descriptor to stay true to get / set / has:

  • alt : alter
  • mod : modify
  • fix : fixing a key
  • fit : (re)fitting a key
  • for : as in, map.for('key', ...
  • pin : pinning down
  • rec : rectify, record
  • ref : reference, reform, refine
  • tie : tie down / when keys are tied

map.fit, map.rec and map.tie cover quite some ground regarding the current proposal.

In case of 4 char names, edit or over (overwrite) may function as shorter alternatives to update.

@dminor
Copy link
Collaborator

dminor commented Oct 24, 2024

Closing in favour of #60.

@dminor dminor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants