Skip to content

Commit

Permalink
'Array find from last' moved to Stage 4
Browse files Browse the repository at this point in the history
  • Loading branch information
afmenez committed Jul 3, 2022
1 parent 9742598 commit 3e94aff
Show file tree
Hide file tree
Showing 4 changed files with 1,032 additions and 1,015 deletions.
68 changes: 66 additions & 2 deletions data-es2016plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -6600,12 +6600,76 @@ exports.tests = [
}
}
]
}
},
{
name: 'Array find from last',
category: '2023 features',
significance: 'small',
spec: 'https://github.com/tc39/proposal-array-find-from-last',
subtests: [
{
name: "Array.prototype.findLast",
exec: function () {/*
var arr = [{ x: 1 }, { x: 2 }, { x: 1 }, { x: 2 }];
return arr.findLast(function (o) { return o.x === 1; }) === arr[2];
*/},
res: {
babel7corejs3: babel.corejs,
typescript3_2corejs3: typescript.corejs,
ie11: false,
chrome1: false,
chrome90: false,
chrome96: false,
chrome97: true,
edge18: false,
firefox2: false,
firefox89: false,
firefox102: false,
firefox103: {
val: 'flagged',
note_id: 'firefox-arrayfindfromlast',
note_html: 'The feature has to be enabled via <code>javascript.options.experimental.array_find_last</code> setting under <code>about:config</code>.'
},
opera10_50: false,
safari12: false,
safaritp: true,
duktape2_0: false,
rhino1_7_13: false
}
},
{
name: "Array.prototype.findLastIndex",
exec: function () {/*
var arr = [{ x: 1 }, { x: 2 }, { x: 1 }, { x: 2 }];
return arr.findLastIndex(function (o) { return o.x === 1; }) === 2;
*/},
res: {
babel7corejs3: babel.corejs,
typescript3_2corejs3: typescript.corejs,
ie11: false,
chrome1: false,
chrome90: false,
chrome96: false,
chrome97: true,
edge18: false,
firefox2: false,
firefox89: false,
firefox102: false,
firefox103: { val: 'flagged', note_id: 'firefox-arrayfindfromlast' },
opera10_50: false,
safari12: false,
safaritp: true,
duktape2_0: false,
rhino1_7_13: false
}
}
]
},
];

//Shift annex B features to the bottom
exports.tests = exports.tests.reduce(function(a,e) {
var index = ['2016 features', '2016 misc', '2017 features', '2017 misc', '2017 annex b', '2018 features', '2018 misc', '2019 features', '2019 misc', '2020 features', '2021 features', '2022 features', 'finished (stage 4)'].indexOf(e.category);
var index = ['2016 features', '2016 misc', '2017 features', '2017 misc', '2017 annex b', '2018 features', '2018 misc', '2019 features', '2019 misc', '2020 features', '2021 features', '2022 features', '2023 features', 'finished (stage 4)'].indexOf(e.category);
if (index === -1) {
console.log('"' + a.category + '" is not an ES2016+ category!');
}
Expand Down
64 changes: 0 additions & 64 deletions data-esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -1344,70 +1344,6 @@ exports.tests = [
rhino1_7_13: false
}
},
{
name: 'Array find from last',
category: STAGE3,
significance: 'small',
spec: 'https://github.com/tc39/proposal-array-find-from-last',
subtests: [
{
name: "Array.prototype.findLast",
exec: function () {/*
var arr = [{ x: 1 }, { x: 2 }, { x: 1 }, { x: 2 }];
return arr.findLast(function (o) { return o.x === 1; }) === arr[2];
*/},
res: {
babel7corejs3: babel.corejs,
typescript3_2corejs3: typescript.corejs,
ie11: false,
chrome1: false,
chrome90: false,
chrome96: false,
chrome97: true,
edge18: false,
firefox2: false,
firefox89: false,
firefox102: false,
firefox103: {
val: 'flagged',
note_id: 'firefox-arrayfindfromlast',
note_html: 'The feature has to be enabled via <code>javascript.options.experimental.array_find_last</code> setting under <code>about:config</code>.'
},
opera10_50: false,
safari12: false,
safaritp: true,
duktape2_0: false,
rhino1_7_13: false
}
},
{
name: "Array.prototype.findLastIndex",
exec: function () {/*
var arr = [{ x: 1 }, { x: 2 }, { x: 1 }, { x: 2 }];
return arr.findLastIndex(function (o) { return o.x === 1; }) === 2;
*/},
res: {
babel7corejs3: babel.corejs,
typescript3_2corejs3: typescript.corejs,
ie11: false,
chrome1: false,
chrome90: false,
chrome96: false,
chrome97: true,
edge18: false,
firefox2: false,
firefox89: false,
firefox102: false,
firefox103: { val: 'flagged', note_id: 'firefox-arrayfindfromlast' },
opera10_50: false,
safari12: false,
safaritp: true,
duktape2_0: false,
rhino1_7_13: false
}
}
]
},
];


Expand Down

0 comments on commit 3e94aff

Please sign in to comment.