Melvin Melvin - 3 months ago 25
Javascript Question

What is the equivalent of jQuery $.extend() in Ember.js?

I used to clone a variable in jquery like this:

var clone = $.extend(true, {}, orig);


Is there any method in Ember.js that is equivalent to this?

Answer

Yes there is: Ember.copy

var clonedObj = Ember.copy(originalObj, true);