(obj, path, bindFnToScope)
| 2149 | */ |
| 2150 | //TODO(misko): this function needs to be removed |
| 2151 | function getter(obj, path, bindFnToScope) { |
| 2152 | if (!path) return obj; |
| 2153 | var keys = path.split('.'); |
| 2154 | var key; |
| 2155 | var lastInstance = obj; |
| 2156 | var len = keys.length; |
| 2157 | |
| 2158 | for (var i = 0; i < len; i++) { |
| 2159 | key = keys[i]; |
| 2160 | if (obj) { |
| 2161 | obj = (lastInstance = obj)[key]; |
| 2162 | } |
| 2163 | } |
| 2164 | if (!bindFnToScope && isFunction(obj)) { |
| 2165 | return bind(lastInstance, obj); |
| 2166 | } |
| 2167 | return obj; |
| 2168 | } |
| 2169 | |
| 2170 | /** |
| 2171 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected