Skip to content

Commit

Permalink
move Array find from last proposal to the stage 2
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Mar 12, 2021
1 parent 2c6567c commit d1d6e02
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Changelog
##### Unreleased
- Nothing
- [`Array` find from last proposal](https://github.com/tc39/proposal-array-find-from-last) moved to the stage 1, [March TC39 meeting](https://github.com/babel/proposals/issues/71#issuecomment-795916535)

##### 3.9.1 - 2021.03.01
- Added a workaround for Chrome 38-40 bug which does not allow to inherit symbols (incl. well-known) from DOM collections prototypes to instances, [#37](https://github.com/zloirock/core-js/issues/37)
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,32 @@ map.emplace('b', { update: it => it ** 2, insert: () => 3}); // => 3

console.log(map); // => Map { 'a': 4, 'b': 3 }
```
##### [Array find from last](https://github.com/tc39/proposal-array-find-from-last)[⬆](#index)
Modules [`esnext.array.find-last`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.array.find-last.js), [`esnext.array.find-last-index`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.array.find-last-index.js), [`esnext.typed-array.find-last`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.typed-array.find-last.js) and [`esnext.typed-array.find-last-index`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.typed-array.find-last-index.js).
```js
class Array {
findLast(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): any;
findLastIndex(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): uint;
}

class %TypedArray% {
findLast(callbackfn: (value: any, index: number, target: %TypedArray%) => boolean, thisArg?: any): any;
findLastIndex(callbackfn: (value: any, index: number, target: %TypedArray%) => boolean, thisArg?: any): uint;
}
```
[*CommonJS entry points:*](#commonjs-api)
```
core-js/proposals/array-find-from-last
core-js(-pure)/features(/virtual)/array/find-last
core-js(-pure)/features(/virtual)/array/find-last-index
core-js/features/typed-array/find-last
core-js/features/typed-array/find-last-index
```
[*Examples*](http://es6.zloirock.ru/#log(%5B1%2C%202%2C%203%2C%204%5D.findLast(it%20%3D%3E%20it%20%25%202))%3B%20%20%20%20%20%20%2F%2F%20%3D%3E%203%0Alog(%5B1%2C%202%2C%203%2C%204%5D.findLastIndex(it%20%3D%3E%20it%20%25%202))%3B%20%2F%2F%20%3D%3E%202):
```js
[1, 2, 3, 4].findLast(it => it % 2); // => 3
[1, 2, 3, 4].findLastIndex(it => it % 2); // => 2
````

#### Stage 1 proposals[⬆](#index)
[*CommonJS entry points:*](#commonjs-api)
Expand Down Expand Up @@ -2436,32 +2462,6 @@ core-js/features/typed-array/unique-by
{ id: 3, uid: 10001 }
].uniqueBy(it => it.id); // => [{ id: 1, uid: 10000 }, { id: 3, uid: 10001 }]
```
##### [Array find from last](https://github.com/tc39/proposal-array-find-from-last)[⬆](#index)
Modules [`esnext.array.find-last`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.array.find-last.js), [`esnext.array.find-last-index`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.array.find-last-index.js), [`esnext.typed-array.find-last`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.typed-array.find-last.js) and [`esnext.typed-array.find-last-index`](https://github.com/zloirock/core-js/blob/v3.9.1/packages/core-js/modules/esnext.typed-array.find-last-index.js).
```js
class Array {
findLast(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): any;
findLastIndex(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): uint;
}
class %TypedArray% {
findLast(callbackfn: (value: any, index: number, target: %TypedArray%) => boolean, thisArg?: any): any;
findLastIndex(callbackfn: (value: any, index: number, target: %TypedArray%) => boolean, thisArg?: any): uint;
}
```
[*CommonJS entry points:*](#commonjs-api)
```
core-js/proposals/array-find-from-last
core-js(-pure)/features(/virtual)/array/find-last
core-js(-pure)/features(/virtual)/array/find-last-index
core-js/features/typed-array/find-last
core-js/features/typed-array/find-last-index
```
[*Examples*](http://es6.zloirock.ru/#log(%5B1%2C%202%2C%203%2C%204%5D.findLast(it%20%3D%3E%20it%20%25%202))%3B%20%20%20%20%20%20%2F%2F%20%3D%3E%203%0Alog(%5B1%2C%202%2C%203%2C%204%5D.findLastIndex(it%20%3D%3E%20it%20%25%202))%3B%20%2F%2F%20%3D%3E%202):
```js
[1, 2, 3, 4].findLast(it => it % 2); // => 3
[1, 2, 3, 4].findLastIndex(it => it % 2); // => 2
````
#### Stage 0 proposals[⬆](#index)
[*CommonJS entry points:*](#commonjs-api)
Expand Down
1 change: 0 additions & 1 deletion packages/core-js/stage/1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require('../proposals/array-filtering');
require('../proposals/array-find-from-last');
require('../proposals/array-last');
require('../proposals/array-unique');
require('../proposals/collection-methods');
Expand Down
1 change: 1 addition & 0 deletions packages/core-js/stage/2.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('../proposals/array-find-from-last');
require('../proposals/array-is-template-object');
require('../proposals/iterator-helpers');
require('../proposals/map-upsert');
Expand Down

0 comments on commit d1d6e02

Please sign in to comment.