mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Rename helper function to better communicate intent
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
6dd41c13ba
commit
67da7d7f5b
2 files changed
+3
-3
No files matched your search
@@ -88,7 +88,7 @@ export async function getOrInsertWithAsync<K, V>(map: Map<K, V>, key: K, asyncBu
|
||||
/**
|
||||
* Insert `val` into `map` under `key` and then get the value back
|
||||
*/
|
||||
export function setAndInsert<K, V>(map: Map<K, V>, key: K, val: V): V {
|
||||
export function setAndGet<K, V>(map: Map<K, V>, key: K, val: V): V {
|
||||
map.set(key, val);
|
||||
|
||||
return map.get(key)!;
|
||||
|
||||
Reference in new issue
Block a user