Object destructuring support


I get an error with these simple lines:

const aux = { hello: "world" };
console.log( { ...aux });

Is object destructuring supported?


Hi Jose,

Unfortunately the spread operator is not supported. The Javascript engine I use (Chakracore) has experimental support for it but it’s not great. I need to re-implement it myself but it will take time.

Sorry for the inconvenience and thanks for reporting.

Thanks for the response.

Would it be possible to use something like babel to have a fully ES6 syntax in a nodejs project?

Hi again @ja_hurtado :wave:

Absolutely, take a look at the React project template that uses webpack and Babel to process JSX files :slightly_smiling_face:.

I have the same problem: a dependency uses destructuring, and I get an error message. I know this may be a big ask, but: would you consider using V8, instead of Chakracore, just like Node does, to get the latest JS features?

Thank you all for your patience. Support for object destructuring as well as the spread operator will be released this week.

1 Like

play.js 1.15.0, which includes this change, is already available for download.