fix(es/preset-env): Move findLast and findLastIndex to finished proposals (#7012)

This commit is contained in:
Daiki Nishikawa 2023-03-06 11:49:08 +09:00 committed by GitHub
parent 1a368def06
commit b46a7248c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 1 deletions

View File

@ -413,7 +413,8 @@ pub static INSTANCE_PROPERTIES: DataMap<&[&str]> = data_map!(Map {
finally: PROMISE_FINALLY,
find: FIND,
findIndex: ["es.array.find-index"],
findLast: "esnext.array.find-last",
findLast: ["es.array.find-last"],
findLastIndex: ["es.array.find-last-index"],
fixed: ["es.string.fixed"],
flags: ["es.regexp.flags"],
flat: ["es.array.flat", "es.array.unscopables.flat"],

View File

@ -0,0 +1,3 @@
const array = [1, 2, 3];
array.findLastIndex();
array.findLast();

View File

@ -0,0 +1,12 @@
{
"presets": [
[
"../../../../lib",
{
"useBuiltIns": "usage",
"corejs": "3.29",
"modules": false
}
]
]
}

View File

@ -0,0 +1,9 @@
import "core-js/modules/es.array.find-last-index.js";
import "core-js/modules/es.array.find-last.js";
var array = [
1,
2,
3
];
array.findLastIndex();
array.findLast();