Open zloirock opened 3 years ago
Sure, methods from this proposal should have equal on %TypedArray%.
Yup. Strangely flatMap
is also missing, though flat
would obviously not do anything.
The question: how should work %TypedArray%.prototype.groupBy?
I think what you're hinting at is what the values would be in the return object? In a normal array.groupBy()
, we'd receive { [key: string]: T[] }
(arrays of the items). We might want to return the TypedArray and populate it with the items instead of a plain array?
I mean that since the length of typed arrays is a constant, we can't use the same logic for returning object with typed arrays.
we can't use the same logic for returning object with typed arrays
Correct, but the spec text can change to support it. I wrote the spec the way I would write the JS, but it may be more appropriate to use a list of { key, list }
structs internally, and transform that into the output object and array/typedarray.
Sure, methods from this proposal should have equal on
%TypedArray%
.The question: how should work
%TypedArray%.prototype.groupBy
?