(obj, path, bindFnToScope)
| 2128 | */ |
| 2129 | //TODO(misko): this function needs to be removed |
| 2130 | function getter(obj, path, bindFnToScope) { |
| 2131 | if (!path) return obj; |
| 2132 | var keys = path.split('.'); |
| 2133 | var key; |
| 2134 | var lastInstance = obj; |
| 2135 | var len = keys.length; |
| 2136 | |
| 2137 | for (var i = 0; i < len; i++) { |
| 2138 | key = keys[i]; |
| 2139 | if (obj) { |
| 2140 | obj = (lastInstance = obj)[key]; |
| 2141 | } |
| 2142 | } |
| 2143 | if (!bindFnToScope && isFunction(obj)) { |
| 2144 | return bind(lastInstance, obj); |
| 2145 | } |
| 2146 | return obj; |
| 2147 | } |
| 2148 | |
| 2149 | /** |
| 2150 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected