proposal-array-grouping
proposal-array-grouping copied to clipboard
A proposal to make grouping of array items easier
- [ ] Test262 tests - [ ] 2 implementations - [x] [Safari](https://bugs.webkit.org/show_bug.cgi?id=234327) - [x] [Chrome](https://bugs.chromium.org/p/v8/issues/detail?id=12499) - [ ] [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1739648) (Nightly) - [ ] Pull Request into ecma262 - [...
Because of https://github.com/tc39/proposal-change-array-by-copy/issues/88#issuecomment-1164495562 I just realized TypedArray support [was removed](https://github.com/tc39/proposal-array-grouping/commit/84b3adc15d75fc1b863eaf0ba591bd9783be5d05). But that commit has no comments and I can't recall any related discussion in the plenary (I also did simple...
https://github.com/tc39/proposal-record-tuple/issues/275 brings up how `groupBy` could be supported on Tuples. Two open questions are: 1. Should the groups be Array or Tuples? 2. Should the output be an Object or...
Thanks for creating this function proposal, I am very exiting to see it. I find this could be useful for many use cases, here are some of them from lodash....
Original proposal: https://github.com/tc39/proposal-array-filtering/issues/2 Ofc with `groupBy` we could be emulate `partition` as: ```js function partition(arr, fn) { return Object.values(arr.groupBy(idx => Number(!fn(idx)))); } ``` or ```js function partition(arr, fn) { return...
The `accumulator` is defined to store grouped data, which should be `{}` by default: ```js ['one', 'two', 'three'].groupBy(i => i.length); // => {3: Array(2), 5: Array(1)} ['one', 'two', 'three'].groupBy(i =>...