[quickjs-devel] Feature request: spread syntax for object literals

  • From: Alexander Rodin <rodin.alexander@xxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Tue, 6 Aug 2019 00:49:46 +0300

It would be nice to have spread syntax for object literals [1] in QuickJS:

let obj = {a: 3, b: 4};
let objClone = { ...obj };

It is in the standard since ECMAScript 2018 [2].

References:

[1] 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
 
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax>
[2] http://www.ecma-international.org/ecma-262/9.0/#sec-object-initializer ;
<http://www.ecma-international.org/ecma-262/10.0/#sec-object-initializer>

Thanks,
Alexander

Other related posts: