Maxime Warnier (2014-06-10T16:32:24.000Z)
Hi All

Do you know if it is planned or maybe in discussion for ES7 to have a
simple clone system on objects ?

There are different notations, from :

 - jquery

Object.clone( [withDataAndEvents ] [, deepWithDataAndEvents ] )

( but only for DOM element )

 - underscore

_.clone(object)

( return the cloned object )

 - angular

angular.copy(source, [destination]);

(return the object, same as underscore, or copy into an optional
destination )


Maybe an Object.copy([options?]) would be interesting ?




Maxime


Maxime Warnier
@maxdow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140610/ab76ed5d/attachment-0001.html>
domenic at domenicdenicola.com (2014-06-12T22:39:40.603Z)
Do you know if it is planned or maybe in discussion for ES7 to have a
simple clone system on objects ?

There are different notations, from :

 - jquery `Object.clone( [withDataAndEvents ] [, deepWithDataAndEvents ] )` ( but only for DOM element )
 - underscore `_.clone(object)` ( return the cloned object )
 - angular `angular.copy(source, [destination]);` (return the object, same as underscore, or copy into an optional destination )

Maybe an `Object.copy([options?])` would be interesting ?