Returning just arrays will be inconsistent with the same name methods that
sit on prototypes of Array, Map, etc.
Yes, Object.keys(...) poisons the iterators idea, but I think these better
to be iterators.
Or, if Object.values and Object.entries will start returning simple arrays
(which of cours
What happened to adding the Object.values and Object.entries methods? There
was some discussion that led me to believe these would be in ES6. Are they
now targeted for ES7?
--
R. Mark Volkmann
Object Computing, Inc.
___
es-discuss mailing list
On Sun, Sep 28, 2014 at 11:28 AM, Mark Volkmann r.mark.volkm...@gmail.com
wrote:
What happened to adding the Object.values and Object.entries methods?
There was some discussion that led me to believe these would be in ES6. Are
they now targeted for ES7?
Yes, proposed by me and always for ES7
Le 16/03/2014 00:45, Rick Waldron a écrit :
On Sat, Mar 15, 2014 at 7:38 PM, Jason Orendorff
jason.orendo...@gmail.com mailto:jason.orendo...@gmail.com wrote:
On Sat, Mar 15, 2014 at 5:19 PM, David Bruant bruan...@gmail.com
mailto:bruan...@gmail.com wrote:
Even if error prone,
Le 15/03/2014 01:32, Brandon Benvie a écrit :
On 3/14/2014 5:16 PM, Mark Volkmann wrote:
Does ES6 add any new ways to iterate over the values in an object?
I've done a lot of searching, but haven't seen anything.
I'm wondering if there is something more elegant than this:
Le 15/03/2014 22:51, C. Scott Ananian a écrit :
It would be nicer to add an Object.entries() method that would return
that iterator.
Object.prototype.entries or Object.entries(obj)?
That would be less error prone than adding a default iterator to every
object.
The world has survived
On Sat, Mar 15, 2014 at 5:19 PM, David Bruant bruan...@gmail.com wrote:
Even if error prone, I'd be interested to hear about arguments in the sense
that the risk outweighs the benefits. Iterable-by-default objects is a nice
battery included feature.
I'm pretty sure es-discuss has been over
This thread's original question is answered by the Dict API (
https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#conclusionresolution-5
).
(more inline below)
On Sat, Mar 15, 2014 at 6:19 PM, David Bruant bruan...@gmail.com wrote:
Le 15/03/2014 22:51, C. Scott Ananian a
Jason Orendorff wrote:
I'd like to see an Object.entries method, and Object.values for
completeness. Same visibility rules as Object.keys.
for (let [k, v] of Object.entries(myObj)) {
// do something with k and v
}
+1, or +2 counting static methods :-).
/be
On Sat, Mar 15, 2014 at 7:38 PM, Jason Orendorff
jason.orendo...@gmail.comwrote:
On Sat, Mar 15, 2014 at 5:19 PM, David Bruant bruan...@gmail.com wrote:
Even if error prone, I'd be interested to hear about arguments in the
sense
that the risk outweighs the benefits. Iterable-by-default
On Sat, Mar 15, 2014 at 6:19 PM, David Bruant bruan...@gmail.com wrote:
Le 15/03/2014 22:51, C. Scott Ananian a écrit :
It would be nicer to add an Object.entries() method that would return that
iterator.
Object.prototype.entries or Object.entries(obj)?
`Object.entries(obj)` and
Does ES6 add any new ways to iterate over the values in an object?
I've done a lot of searching, but haven't seen anything.
I'm wondering if there is something more elegant than this:
Object.keys(myObj).forEach(function (key) {
let obj = myObj[key];
// do something with obj
});
--
R. Mark
On 3/14/2014 5:16 PM, Mark Volkmann wrote:
Does ES6 add any new ways to iterate over the values in an object?
I've done a lot of searching, but haven't seen anything.
I'm wondering if there is something more elegant than this:
Object.keys(myObj).forEach(function (key) {
let obj = myObj[key];
13 matches
Mail list logo