Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Generators #1664

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions features/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Generators
description: Generator functions (`function*`) create iterators that return multiple values, one after another, on-demand.
group: javascript
snapshot: ecmascript-2015
caniuse: es6-generators
spec:
- https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-generator-objects
- https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-generatorfunction-objects
status:
compute_from: javascript.statements.generator_function
compat_features:
- javascript.builtins.Generator
- javascript.builtins.Generator.next
- javascript.builtins.Generator.return
- javascript.builtins.Generator.throw
- javascript.builtins.GeneratorFunction
- javascript.builtins.GeneratorFunction.GeneratorFunction
- javascript.operators.generator_function
- javascript.operators.generator_function.trailing_comma
- javascript.operators.yield
- javascript.operators.yield_star
- javascript.statements.generator_function
- javascript.statements.generator_function.IteratorResult_object
- javascript.statements.generator_function.not_constructable_with_new
- javascript.statements.generator_function.trailing_comma_in_parameters
138 changes: 138 additions & 0 deletions features/generators.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Generated from: generators.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: "39"
chrome_android: "39"
edge: "13"
firefox: "26"
firefox_android: "26"
safari: "10"
safari_ios: "10"
compat_features:
# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "39"
# chrome_android: "39"
# edge: "12"
# firefox: "26"
# firefox_android: "26"
# safari: "10"
# safari_ios: "10"
- javascript.operators.yield

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "39"
# chrome_android: "39"
# edge: "12"
# firefox: "27"
# firefox_android: "27"
# safari: "10"
# safari_ios: "10"
- javascript.operators.yield_star

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "39"
# chrome_android: "39"
# edge: "13"
# firefox: "26"
# firefox_android: "26"
# safari: "10"
# safari_ios: "10"
- javascript.builtins.Generator
- javascript.builtins.Generator.next
- javascript.builtins.Generator.throw
- javascript.builtins.GeneratorFunction
- javascript.builtins.GeneratorFunction.GeneratorFunction
- javascript.statements.generator_function

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "49"
# chrome_android: "49"
# edge: "12"
# firefox: "26"
# firefox_android: "26"
# safari: "10"
# safari_ios: "10"
- javascript.operators.generator_function

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "49"
# chrome_android: "49"
# edge: "13"
# firefox: "29"
# firefox_android: "29"
# safari: "10"
# safari_ios: "10"
- javascript.statements.generator_function.IteratorResult_object

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "50"
# chrome_android: "50"
# edge: "13"
# firefox: "38"
# firefox_android: "38"
# safari: "10"
# safari_ios: "10"
- javascript.builtins.Generator.return

# baseline: high
# baseline_low_date: 2016-09-20
# baseline_high_date: 2019-03-20
# support:
# chrome: "50"
# chrome_android: "50"
# edge: "13"
# firefox: "43"
# firefox_android: "43"
# safari: "10"
# safari_ios: "10"
- javascript.statements.generator_function.not_constructable_with_new

# baseline: high
# baseline_low_date: 2017-04-25
# baseline_high_date: 2019-10-25
# support:
# chrome: "58"
# chrome_android: "58"
# edge: "14"
# firefox: "52"
# firefox_android: "52"
# safari: "10"
# safari_ios: "10"
- javascript.statements.generator_function.trailing_comma_in_parameters

# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "58"
# chrome_android: "58"
# edge: "79"
# firefox: "52"
# firefox_android: "52"
# safari: "10"
# safari_ios: "10"
- javascript.operators.generator_function.trailing_comma