You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Although filtering by hasOwnProperty is usually desired (and makes objects easier to work with as maps), it is not usually the default. The docs for angular.forEach should specify this.
Along the same lines, angular.extend should mention the same thing just because, again, it's not obvious what the default should be. (jQuery.extend looks identical on the surface but does not filter on hasOwnProperty for example - neither is "more correct", it just needs to be clearly spelled out.)
I also noticed in the code that angular.extend does some additional things to do with maintaining the $$hashKey identity that should probably be mentioned. E.g. angular.extend should be the prefered way of copying objects so said identity works as expected (I don't actually know that's what it does, only had time to skim through).
(As an aside, would be worth bringing up HashMap as a a public API? It looks like it might be a handy way of associating, say, DOM specific data to objects (like controller values) that should ideally remain ignorant of the DOM.)