C. Scott Ananian (2014-03-21T15:32:16.000Z)
On Fri, Mar 21, 2014 at 10:10 AM, Jason Orendorff
<jason.orendorff at gmail.com> wrote:
> Because of that, and because Object.keys already returns an array, I
> think Object.values and Object.entries should too.

I agree.  This is also consistent with the arrays returned by
getPropertyDescriptors and the proxy trap (which I believe was also
going to be changed from an iterator to an array).

It's not an iterator, but it's still an iterable.  It should work
seamlessly in common cases such as `new Map(Object.entries(obj)`
(which happens to be the use case I was thinking of in particular when
I wrote the OP) and `Array.from(Object.entries())` (which is pointless
in itself, but we might start seeing `Array.from` in generic contexts
to snapshot possible iterators/iterables).
  --scott
domenic at domenicdenicola.com (2014-03-30T16:06:38.200Z)
On Fri, Mar 21, 2014 at 10:10 AM, Jason Orendorff <jason.orendorff at gmail.com> wrote:
> Because of that, and because Object.keys already returns an array, I
> think Object.values and Object.entries should too.

I agree.  This is also consistent with the arrays returned by
getPropertyDescriptors and the proxy trap (which I believe was also
going to be changed from an iterator to an array).

It's not an iterator, but it's still an iterable.  It should work
seamlessly in common cases such as `new Map(Object.entries(obj)`
(which happens to be the use case I was thinking of in particular when
I wrote the OP) and `Array.from(Object.entries())` (which is pointless
in itself, but we might start seeing `Array.from` in generic contexts
to snapshot possible iterators/iterables).