typescript/array/group-by@1
group-by
Partition an array into groups by a key computed from each element, keeping the input order everywhere and the key values exactly as the key function returned them.
This contract was written in full and then turned down. It is not installable, there is no command for it, and there will not be one. What the catalogue publishes about it is the decision and the measurement that decision rests on, so that the decision can be disagreed with.
Turned down for
permanent rule 7 - nothing trivial in the catalogue
On this measurement
Map.groupBy answers what this contract requires on all thirty cases of block 4.4, replayed by language.test.ts on Node 24.15.0. Where the language ships the function, the TC39 specification is the contract.
Kept as
the third prototype the contract format was settled on
What this page does not show
The contract as written - the signature, the properties, and the cases it settled one at a time - is not on this page. A contract is frozen when it is published, and this one never was: the registry recorded an argument and bound no digest, so there is no frozen definition at this address and nothing here that a reader could hash and compare. Every other contract page of this catalogue publishes a digest. This one has none, and saying so is worth more than a section shaped like the others with nothing behind it.