Closed alebedev closed 10 years ago
No, because _.extend
doesn't support deep clones. Loading the jQuery module in Node shouldn't be problematic... what issue are you having?
I'm sure the issue is more a semantic and code cleanliness thing than not actually being able to load jQuery as a dependency. I agree with @alebedev here: no model should depend on a DOM manipulation library. I would go as far as saying if you need a deep extend, that you implement it within this library.
I would consider a PR (depending on how much code it adds), but otherwise chalking this up as "if it ain't broke..."
deepClone
currently usesjQuery.extend
. This makes library dependent on jQuery when Backbone model layer only depends on underscore. jQuery dependency makes using model code on server problematic. Could you replacejQuery.extend
with_.extend
?