From 1518fe5b3e57afa235c1e87184304e12151bff10 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Mon, 26 Aug 2024 11:31:34 +0200 Subject: [PATCH 1/3] Add Iterators and the for..of loop --- features/iterators.yml | 14 ++++++++ features/iterators.yml.dist | 68 +++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 features/iterators.yml create mode 100644 features/iterators.yml.dist diff --git a/features/iterators.yml b/features/iterators.yml new file mode 100644 index 00000000000..30b9634a7ad --- /dev/null +++ b/features/iterators.yml @@ -0,0 +1,14 @@ +name: Iterators and the for..of loop +description: The `for...of` loop operates on a sequence of values sourced from an iterable object (arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables). +group: iterators +snapshot: ecmascript-2015 +spec: + - https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-%iteratorprototype%-object + - https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-for-in-and-for-of-statements +status: + compute_from: javascript.statements.for_of +compat_features: + - javascript.builtins.Iterator + - javascript.builtins.Iterator.@@iterator + - javascript.statements.for_of + - javascript.statements.for_of.closing_iterators diff --git a/features/iterators.yml.dist b/features/iterators.yml.dist new file mode 100644 index 00000000000..ef35e026158 --- /dev/null +++ b/features/iterators.yml.dist @@ -0,0 +1,68 @@ +# Generated from: iterators.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2015-07-29 + baseline_high_date: 2018-01-29 + support: + chrome: "38" + chrome_android: "38" + edge: "12" + firefox: "13" + firefox_android: "14" + safari: "7" + safari_ios: "7" +compat_features: + # ⬇️ Same status as overall feature ⬇️ + # baseline: high + # baseline_low_date: 2015-07-29 + # baseline_high_date: 2018-01-29 + # support: + # chrome: "38" + # chrome_android: "38" + # edge: "12" + # firefox: "13" + # firefox_android: "14" + # safari: "7" + # safari_ios: "7" + - javascript.statements.for_of + + # baseline: high + # baseline_low_date: 2016-09-20 + # baseline_high_date: 2019-03-20 + # support: + # chrome: "38" + # chrome_android: "38" + # edge: "12" + # firefox: "17" + # firefox_android: "17" + # safari: "10" + # safari_ios: "10" + - javascript.builtins.Iterator + + # baseline: high + # baseline_low_date: 2016-09-20 + # baseline_high_date: 2019-03-20 + # support: + # chrome: "38" + # chrome_android: "38" + # edge: "12" + # firefox: "36" + # firefox_android: "36" + # safari: "10" + # safari_ios: "10" + - javascript.builtins.Iterator.@@iterator + + # baseline: high + # baseline_low_date: 2017-04-19 + # baseline_high_date: 2019-10-19 + # support: + # chrome: "51" + # chrome_android: "51" + # edge: "14" + # firefox: "53" + # firefox_android: "53" + # safari: "7" + # safari_ios: "7" + - javascript.statements.for_of.closing_iterators From 93e250a66d649b0b1788957030356775025ff87f Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Wed, 11 Sep 2024 11:03:11 +0200 Subject: [PATCH 2/3] Apply suggestions from code review --- features/iterators.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/iterators.yml b/features/iterators.yml index 30b9634a7ad..d5cdb108bc8 100644 --- a/features/iterators.yml +++ b/features/iterators.yml @@ -1,5 +1,5 @@ -name: Iterators and the for..of loop -description: The `for...of` loop operates on a sequence of values sourced from an iterable object (arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables). +name: Iterators and the for...of loop +description: The `for...of` loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the `Iterator` class. group: iterators snapshot: ecmascript-2015 spec: From 60c280cc6ee000e46972c8a0a6fca785055ef80a Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Wed, 11 Sep 2024 11:07:28 +0200 Subject: [PATCH 3/3] Update iterators.yml --- features/iterators.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/iterators.yml b/features/iterators.yml index d5cdb108bc8..b56d9c21634 100644 --- a/features/iterators.yml +++ b/features/iterators.yml @@ -1,5 +1,5 @@ name: Iterators and the for...of loop -description: The `for...of` loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the `Iterator` class. +description: The `for...of` loop operates on a sequence of values sourced from an iterable object, such as arrays, array-like objects, DOM collections, iterators, generators, and user-defined iterables. All built-in iterators inherit from the `Iterator` class. group: iterators snapshot: ecmascript-2015 spec: