Skip to content

Commit 2afa5ae

Browse files
Add feature for Map.prototype.getOrInsert() (#3360)
Co-authored-by: Patrick Brosset <patrickbrosset@gmail.com>
1 parent 47da50f commit 2afa5ae

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

features/getorinsert.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Map getOrInsert()
2+
description: The `getOrInsert()` and `getOrInsertComputed()` methods of `Map` objects get a value, setting and getting a default value if needed.
3+
spec: https://tc39.es/proposal-upsert/
4+
compat_features:
5+
- javascript.builtins.Map.getOrInsert
6+
- javascript.builtins.Map.getOrInsertComputed
7+
- javascript.builtins.WeakMap.getOrInsert
8+
- javascript.builtins.WeakMap.getOrInsertComputed

features/getorinsert.yml.dist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Generated from: getorinsert.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support: {}
7+
compat_features:
8+
- javascript.builtins.Map.getOrInsert
9+
- javascript.builtins.Map.getOrInsertComputed
10+
- javascript.builtins.WeakMap.getOrInsert
11+
- javascript.builtins.WeakMap.getOrInsertComputed

0 commit comments

Comments
 (0)