-
Notifications
You must be signed in to change notification settings - Fork 198
Add various JavaScript features #2417
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| name: Exponentiation operator | ||
| description: The exponentiation (`**`) operator returns the result of raising the first operand to the power of the second operand. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-exp-operator | ||
| group: javascript | ||
| snapshot: ecmascript-2016 | ||
| compat_features: | ||
| - javascript.operators.exponentiation | ||
| - javascript.operators.exponentiation_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated from: exponentiation.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2017-03-27 | ||
| baseline_high_date: 2019-09-27 | ||
| support: | ||
| chrome: "52" | ||
| chrome_android: "52" | ||
| edge: "14" | ||
| firefox: "52" | ||
| firefox_android: "52" | ||
| safari: "10.1" | ||
| safari_ios: "10.3" | ||
| compat_features: | ||
| - javascript.operators.exponentiation | ||
| - javascript.operators.exponentiation_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: globalThis | ||
| description: The `globalThis` property accesses the global `this` value (and hence the global object itself) across environments. | ||
| spec: https://tc39.es/ecma262/multipage/global-object.html#sec-globalthis | ||
| snapshot: ecmascript-2020 | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.builtins.globalThis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: globalthis.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-01-15 | ||
| baseline_high_date: 2022-07-15 | ||
| support: | ||
| chrome: "71" | ||
| chrome_android: "71" | ||
| edge: "79" | ||
| firefox: "65" | ||
| firefox_android: "65" | ||
| safari: "12.1" | ||
| safari_ios: "12.2" | ||
| compat_features: | ||
| - javascript.builtins.globalThis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: Hashbang comments | ||
| 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. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-hashbang | ||
| snapshot: ecmascript-2023 | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.grammar.hashbang_comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: hashbang-comments.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-03-24 | ||
| baseline_high_date: 2022-09-24 | ||
| support: | ||
| chrome: "74" | ||
| chrome_android: "74" | ||
| edge: "79" | ||
| firefox: "67" | ||
| firefox_android: "67" | ||
| safari: "13.1" | ||
| safari_ios: "13.4" | ||
| compat_features: | ||
| - javascript.grammar.hashbang_comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: Let and const | ||
| description: The `let` and `const` declarations define block-scoped variables. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-let-and-const-declarations | ||
| caniuse: | ||
| - let | ||
| - const | ||
| group: javascript | ||
| snapshot: ecmascript-2015 | ||
| compat_features: | ||
| - javascript.statements.const | ||
| - javascript.statements.let | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Generated from: let-const.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2016-09-20 | ||
| baseline_high_date: 2019-03-20 | ||
| support: | ||
| chrome: "49" | ||
| chrome_android: "49" | ||
| edge: "14" | ||
| firefox: "44" | ||
| firefox_android: "44" | ||
| safari: "10" | ||
| safari_ios: "10" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2015-07-29 | ||
| # baseline_high_date: 2018-01-29 | ||
| # support: | ||
| # chrome: "21" | ||
| # chrome_android: "25" | ||
| # edge: "12" | ||
| # firefox: "36" | ||
| # firefox_android: "36" | ||
| # safari: "5.1" | ||
| # safari_ios: "5" | ||
| - javascript.statements.const | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2016-09-20 | ||
| # baseline_high_date: 2019-03-20 | ||
| # support: | ||
| # chrome: "49" | ||
| # chrome_android: "49" | ||
| # edge: "14" | ||
| # firefox: "44" | ||
| # firefox_android: "44" | ||
| # safari: "10" | ||
| # safari_ios: "10" | ||
| - javascript.statements.let |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: Logical assignments | ||
| description: The logical AND assignment (`&&=`) and the logical OR assignment (`||=`) operators short-circuit the respective binary logical operators. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-assignment-operators | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.operators.logical_and_assignment | ||
| - javascript.operators.logical_or_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated from: logical-assignments.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-09-16 | ||
| baseline_high_date: 2023-03-16 | ||
| support: | ||
| chrome: "85" | ||
| chrome_android: "85" | ||
| edge: "85" | ||
| firefox: "79" | ||
| firefox_android: "79" | ||
| safari: "14" | ||
| safari_ios: "14" | ||
| compat_features: | ||
| - javascript.operators.logical_and_assignment | ||
| - javascript.operators.logical_or_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| name: Nullish coalescing | ||
| description: The nullish coalescing (`??`) and nullish coalescing assignment (`??=`) operators return (or assign) its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#prod-CoalesceExpression | ||
| snapshot: ecmascript-2020 | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.operators.nullish_coalescing | ||
| - javascript.operators.nullish_coalescing_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Generated from: nullish-coalescing.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-09-16 | ||
| baseline_high_date: 2023-03-16 | ||
| support: | ||
| chrome: "85" | ||
| chrome_android: "85" | ||
| edge: "85" | ||
| firefox: "79" | ||
| firefox_android: "79" | ||
| safari: "14" | ||
| safari_ios: "14" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2020-07-28 | ||
| # baseline_high_date: 2023-01-28 | ||
| # support: | ||
| # chrome: "80" | ||
| # chrome_android: "80" | ||
| # edge: "80" | ||
| # firefox: "72" | ||
| # firefox_android: "79" | ||
| # safari: "13.1" | ||
| # safari_ios: "13.4" | ||
| - javascript.operators.nullish_coalescing | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2020-09-16 | ||
| # baseline_high_date: 2023-03-16 | ||
| # support: | ||
| # chrome: "85" | ||
| # chrome_android: "85" | ||
| # edge: "85" | ||
| # firefox: "79" | ||
| # firefox_android: "79" | ||
| # safari: "14" | ||
| # safari_ios: "14" | ||
| - javascript.operators.nullish_coalescing_assignment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: Numeric separators | ||
| description: To improve readability for numeric literals, underscores (`_`) can be used as separators. For example, `1_050.95` is equivalent to `1050.95`. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#prod-NumericLiteralSeparator | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.grammar.numeric_separators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: numeric-seperators.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-07-28 | ||
| baseline_high_date: 2023-01-28 | ||
| support: | ||
| chrome: "75" | ||
| chrome_android: "75" | ||
| edge: "79" | ||
| firefox: "70" | ||
| firefox_android: "79" | ||
| safari: "13" | ||
| safari_ios: "13" | ||
| compat_features: | ||
| - javascript.grammar.numeric_separators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: Optional catch binding | ||
| description: Omit the the binding parameter of a `catch` clause when you don't need information about the exception in a `try ... catch` statement. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-try-statement | ||
| group: javascript | ||
| snapshot: ecmascript-2019 | ||
| compat_features: | ||
| - javascript.statements.try_catch.optional_catch_binding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: optional-catch-binding.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-01-15 | ||
| baseline_high_date: 2022-07-15 | ||
| support: | ||
| chrome: "66" | ||
| chrome_android: "66" | ||
| edge: "79" | ||
| firefox: "58" | ||
| firefox_android: "58" | ||
| safari: "11.1" | ||
| safari_ios: "11.3" | ||
| compat_features: | ||
| - javascript.statements.try_catch.optional_catch_binding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: Template literals | ||
| description: Template literals are literals delimited with backtick (<code>`</code>) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-template-literals | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.grammar.template_literals | ||
| - javascript.grammar.template_literals.template_literal_revision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Generated from: template-literals.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2020-01-15 | ||
| baseline_high_date: 2022-07-15 | ||
| support: | ||
| chrome: "62" | ||
| chrome_android: "62" | ||
| edge: "79" | ||
| firefox: "53" | ||
| firefox_android: "53" | ||
| safari: "11" | ||
| safari_ios: "11" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2015-09-30 | ||
| # baseline_high_date: 2018-03-30 | ||
| # support: | ||
| # chrome: "41" | ||
| # chrome_android: "41" | ||
| # edge: "12" | ||
| # firefox: "34" | ||
| # firefox_android: "34" | ||
| # safari: "9" | ||
| # safari_ios: "9" | ||
| - javascript.grammar.template_literals | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: high | ||
| # baseline_low_date: 2020-01-15 | ||
| # baseline_high_date: 2022-07-15 | ||
| # support: | ||
| # chrome: "62" | ||
| # chrome_android: "62" | ||
| # edge: "79" | ||
| # firefox: "53" | ||
| # firefox_android: "53" | ||
| # safari: "11" | ||
| # safari_ios: "11" | ||
| - javascript.grammar.template_literals.template_literal_revision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| name: Top-level await | ||
| description: The `await` keyword, when used at the top level of a module (outside of an async function), delays parent module execution until after a promise fulfills. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-functions-and-classes.html#sec-async-function-definitions | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.operators.await.top_level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: top-level-await.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2021-09-20 | ||
| baseline_high_date: 2024-03-20 | ||
| support: | ||
| chrome: "89" | ||
| chrome_android: "89" | ||
| edge: "89" | ||
| firefox: "89" | ||
| firefox_android: "89" | ||
| safari: "15" | ||
| safari_ios: "15" | ||
| compat_features: | ||
| - javascript.operators.await.top_level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: Unicode point escapes | ||
| description: Unicode point escapes (`\\u{}`) represent Unicode characters within strings. | ||
| spec: https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#prod-UnicodeEscapeSequence | ||
| snapshot: ecmascript-2015 | ||
| group: javascript | ||
| compat_features: | ||
| - javascript.grammar.unicode_point_escapes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Generated from: unicode-point-escapes.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: high | ||
| baseline_low_date: 2015-09-30 | ||
| baseline_high_date: 2018-03-30 | ||
| support: | ||
| chrome: "44" | ||
| chrome_android: "44" | ||
| edge: "12" | ||
| firefox: "40" | ||
| firefox_android: "40" | ||
| safari: "9" | ||
| safari_ios: "9" | ||
| compat_features: | ||
| - javascript.grammar.unicode_point_escapes |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.