Question ... perhaps a proposal: extract from object to object

peter miller fuchsia.groan at virgin.net
Fri Mar 17 10:25:33 UTC 2017


Hi,

> There seems to be little appetite for taking it up, in spite of it being
> (IMHO) a very common use case.

I'll second it being common in my code. My personal highlights would be  
assigning to this:

```
this.{x,y,z} = a;
```

and combining it with property spreading:

```
const result = { a, b, ...x.{ y, z }, ...p.{ q, r } };
```

Peter

-- 
"There were drawings, and sheets of paper with writing on them, and it  
seemed that they were the sustenance of life, that here were the warlocks,  
almost the vehicles of destruction of man's life, but at the same time the  
very reason for his living." --- Maeve Gilmore/Titus Awakes.


More information about the es-discuss mailing list