Melvin Melvin - 1 month ago 12x
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);