Skip to content

Commit 1adc86c

Browse files
Elchi3captainbrossetddbeck
authored
Add various JavaScript features (#2417)
* Add various JavaScript features * Add more * Apply suggestions from code review Co-authored-by: Patrick Brosset <[email protected]> * move to functions * Apply suggestions from code review Co-authored-by: Daniel D. Beck <[email protected]> --------- Co-authored-by: Patrick Brosset <[email protected]> Co-authored-by: Daniel D. Beck <[email protected]>
1 parent b7879d3 commit 1adc86c

24 files changed

+347
-0
lines changed

features/exponentiation.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Exponentiation operator
2+
description: The exponentiation (`**`) operator returns the result of raising the first operand to the power of the second operand.
3+
spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-exp-operator
4+
group: javascript
5+
snapshot: ecmascript-2016
6+
compat_features:
7+
- javascript.operators.exponentiation
8+
- javascript.operators.exponentiation_assignment

features/exponentiation.yml.dist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated from: exponentiation.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: high
6+
baseline_low_date: 2017-03-27
7+
baseline_high_date: 2019-09-27
8+
support:
9+
chrome: "52"
10+
chrome_android: "52"
11+
edge: "14"
12+
firefox: "52"
13+
firefox_android: "52"
14+
safari: "10.1"
15+
safari_ios: "10.3"
16+
compat_features:
17+
- javascript.operators.exponentiation
18+
- javascript.operators.exponentiation_assignment

features/functions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ compat_features:
4444
- javascript.operators.function.trailing_comma
4545
- javascript.statements.function
4646
- javascript.statements.function.trailing_comma_in_parameters
47+
- javascript.grammar.trailing_commas.trailing_commas_in_functions

features/functions.yml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ compat_features:
298298
# firefox_android: "52"
299299
# safari: "10"
300300
# safari_ios: "10"
301+
- javascript.grammar.trailing_commas.trailing_commas_in_functions
301302
- javascript.operators.function.trailing_comma
302303
- javascript.statements.function.trailing_comma_in_parameters
303304

features/globalthis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: globalThis
2+
description: The `globalThis` property accesses the global `this` value (and hence the global object itself) across environments.
3+
spec: https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis
4+
snapshot: ecmascript-2020
5+
group: javascript
6+
compat_features:
7+
- javascript.builtins.globalThis

features/globalthis.yml.dist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated from: globalthis.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: high
6+
baseline_low_date: 2020-01-15
7+
baseline_high_date: 2022-07-15
8+
support:
9+
chrome: "71"
10+
chrome_android: "71"
11+
edge: "79"
12+
firefox: "65"
13+
firefox_android: "65"
14+
safari: "12.1"
15+
safari_ios: "12.2"
16+
compat_features:
17+
- javascript.builtins.globalThis

features/hashbang-comments.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Hashbang comments
2+
description: The `#!` comment at the absolute start of a script or module is treated as a normal comment and is ignored by the JavaScript engine.
3+
spec: https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-hashbang
4+
snapshot: ecmascript-2023
5+
group: javascript
6+
compat_features:
7+
- javascript.grammar.hashbang_comments
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated from: hashbang-comments.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: high
6+
baseline_low_date: 2020-03-24
7+
baseline_high_date: 2022-09-24
8+
support:
9+
chrome: "74"
10+
chrome_android: "74"
11+
edge: "79"
12+
firefox: "67"
13+
firefox_android: "67"
14+
safari: "13.1"
15+
safari_ios: "13.4"
16+
compat_features:
17+
- javascript.grammar.hashbang_comments

features/let-const.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Let and const
2+
description: The `let` and `const` declarations define block-scoped variables.
3+
spec: https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-let-and-const-declarations
4+
caniuse:
5+
- let
6+
- const
7+
group: javascript
8+
snapshot: ecmascript-2015
9+
compat_features:
10+
- javascript.statements.const
11+
- javascript.statements.let

features/let-const.yml.dist

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Generated from: let-const.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: high
6+
baseline_low_date: 2016-09-20
7+
baseline_high_date: 2019-03-20
8+
support:
9+
chrome: "49"
10+
chrome_android: "49"
11+
edge: "14"
12+
firefox: "44"
13+
firefox_android: "44"
14+
safari: "10"
15+
safari_ios: "10"
16+
compat_features:
17+
# baseline: high
18+
# baseline_low_date: 2015-07-29
19+
# baseline_high_date: 2018-01-29
20+
# support:
21+
# chrome: "21"
22+
# chrome_android: "25"
23+
# edge: "12"
24+
# firefox: "36"
25+
# firefox_android: "36"
26+
# safari: "5.1"
27+
# safari_ios: "5"
28+
- javascript.statements.const
29+
30+
# ⬇️ Same status as overall feature ⬇️
31+
# baseline: high
32+
# baseline_low_date: 2016-09-20
33+
# baseline_high_date: 2019-03-20
34+
# support:
35+
# chrome: "49"
36+
# chrome_android: "49"
37+
# edge: "14"
38+
# firefox: "44"
39+
# firefox_android: "44"
40+
# safari: "10"
41+
# safari_ios: "10"
42+
- javascript.statements.let

0 commit comments

Comments
 (0)