view raw
Melvin Melvin - 8 months ago 68
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?


Yes there is: Ember.copy

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