Object copy

Maxime Warnier marmax at gmail.com
Tue Jun 10 09:32:24 PDT 2014


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>


More information about the es-discuss mailing list