(obj, path, bindFnToScope)
| 2089 | */ |
| 2090 | //TODO(misko): this function needs to be removed |
| 2091 | function getter(obj, path, bindFnToScope) { |
| 2092 | if (!path) return obj; |
| 2093 | var keys = path.split('.'); |
| 2094 | var key; |
| 2095 | var lastInstance = obj; |
| 2096 | var len = keys.length; |
| 2097 | |
| 2098 | for (var i = 0; i < len; i++) { |
| 2099 | key = keys[i]; |
| 2100 | if (obj) { |
| 2101 | obj = (lastInstance = obj)[key]; |
| 2102 | } |
| 2103 | } |
| 2104 | if (!bindFnToScope && isFunction(obj)) { |
| 2105 | return bind(lastInstance, obj); |
| 2106 | } |
| 2107 | return obj; |
| 2108 | } |
| 2109 | |
| 2110 | /** |
| 2111 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected