I like it. Useful, with little conceptual and syntactical baggage.
> Fortunately there's a short-hand:
>
> let {draw, move} = GraphixAPIObject;
>
> where the property id also names the variable to bind.
>
> It has been proposed that this shorthand be supported for structuring as well
> as destructuring:
>
> saveObject({draw, move});
>
> would pass a new Object created as if by the initialiser ({draw: draw, move:
> move}). The property id is treated as an identifier expression and evaluated
> to get the property value.
>
> We have some support for this on TC39 but it keeps dropping off the radar.
> Comments welcome.
>
> /be
>
>
--
Dr. Axel Rauschmayer
[email protected]
twitter.com/rauschma
home: rauschma.de
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss