I think we should just eliminate simple wrappers for core angular functions. It is just making the code harder to understand without adding any real benefits.
[x] utils.defer ==> $q.defer
[x] utils.reject ==> $q.reject
[x] utils.resolve ==> $q.when
[ ] utils.compile ==> $rootScope.$evalAsync
[ ] utils.batch ==> $rootScope.$evalAsync
[ ] utils.applyDefaults ==> angular.extend (not a wrapper, but provides identical functionality)
Also, we should eliminate functions that are only used once (and just inline the functionality we need).
[ ] utils.wait - only used once inside of utils.debounce
[ ] utils.dataKeys - only used in tests
Finally, for angularfire 2.0.0, we should drop support for outdated dependencies.
[x] utils.promise and the Q polyfill ==> $q(fn)once we drop angular 1.2.x support
[x] utils.getKey ==> ref.key()once we drop Firebase 1.x.x support
These look great, James. Thanks for putting this list together. I'm not sure when Kato or I will have a chance to get to these, but we will gladly merge any PRs you keep sending our way.
I think we should just eliminate simple wrappers for core angular functions. It is just making the code harder to understand without adding any real benefits.
utils.defer
==>$q.defer
utils.reject
==>$q.reject
utils.resolve
==>$q.when
utils.compile
==>$rootScope.$evalAsync
utils.batch
==>$rootScope.$evalAsync
utils.applyDefaults
==>angular.extend
(not a wrapper, but provides identical functionality)Also, we should eliminate functions that are only used once (and just inline the functionality we need).
utils.wait
- only used once inside ofutils.debounce
utils.dataKeys
- only used in testsFinally, for angularfire 2.0.0, we should drop support for outdated dependencies.
utils.promise
and theQ
polyfill ==>$q(fn)
once we drop angular 1.2.x supportutils.getKey
==>ref.key()
once we drop Firebase 1.x.x support