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