Object.create() ?
 
It's not exactly cloning, but it'll probably work better than cloning in most cases.
 
 
10.06.2014, 20:33, "Maxime Warnier" <mar...@gmail.com>:
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
,

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to