Closed austinpray closed 10 years ago
The only reason was that I was using Underscore for some old directives, and wasn't aware of the Angular API having an extend function available. I see you have submitted a pull request removing the Underscore dependency, so I've gone ahead and merged it. Really helps having a fresh set of eyes taking a look at the code ;)
Hello! What a wonderful repo, thank you for making this available.
One thing I am curious about: is there a particular reason you are using
_.extend
in theAuth
factory? https://github.com/fnakstad/angular-client-side-auth/blob/master/client/js/services.js#L13My own personal preference is to use
angular.extend
simply to reduce external dependencies wherever I can. But I was wondering if there are any arguments for using the underscore extend instead? Am I missing out on anything by using 'angular.extend'? Looking at the source for both, they seem functionally equivalent.All things equal, angular.extend is technically faster. http://jsperf.com/angular-extend-vs-underscore-extend/ http://jsperf.com/angular-extend-vs-underscore-extend/5
Thank you!