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