Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Better align GroupBy keyCoercion with CanonicalizeKeyedCollectionKey #3343

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -6785,7 +6785,7 @@ <h1>
GroupBy (
_items_: an ECMAScript language value,
_callbackfn_: an ECMAScript language value,
_keyCoercion_: ~property~ or ~zero~,
_keyCoercion_: ~property~ or ~collection~,
): either a normal completion containing a List of Records with fields [[Key]] (an ECMAScript language value) and [[Elements]] (a List of ECMAScript language values), or a throw completion
</h1>
<dl class="header">
Expand All @@ -6810,7 +6810,7 @@ <h1>
1. Set _key_ to Completion(ToPropertyKey(_key_)).
1. IfAbruptCloseIterator(_key_, _iteratorRecord_).
1. Else,
1. Assert: _keyCoercion_ is ~zero~.
1. Assert: _keyCoercion_ is ~collection~.
1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_).
1. Perform AddValueToKeyedGroup(_groups_, _key_, _value_).
1. Set _k_ to _k_ + 1.
Expand Down Expand Up @@ -41743,7 +41743,7 @@ <h1>Map.groupBy ( _items_, _callbackfn_ )</h1>
</emu-note>
<p>This function performs the following steps when called:</p>
<emu-alg>
1. Let _groups_ be ? GroupBy(_items_, _callbackfn_, ~zero~).
1. Let _groups_ be ? GroupBy(_items_, _callbackfn_, ~collection~).
1. Let _map_ be ! Construct(%Map%).
1. For each Record { [[Key]], [[Elements]] } _g_ of _groups_, do
1. Let _elements_ be CreateArrayFromList(_g_.[[Elements]]).
Expand Down
Loading