(obj, path, bindFnToScope)
| 1975 | */ |
| 1976 | //TODO(misko): this function needs to be removed |
| 1977 | function getter(obj, path, bindFnToScope) { |
| 1978 | if (!path) return obj; |
| 1979 | var keys = path.split('.'); |
| 1980 | var key; |
| 1981 | var lastInstance = obj; |
| 1982 | var len = keys.length; |
| 1983 | |
| 1984 | for (var i = 0; i < len; i++) { |
| 1985 | key = keys[i]; |
| 1986 | if (obj) { |
| 1987 | obj = (lastInstance = obj)[key]; |
| 1988 | } |
| 1989 | } |
| 1990 | if (!bindFnToScope && isFunction(obj)) { |
| 1991 | return bind(lastInstance, obj); |
| 1992 | } |
| 1993 | return obj; |
| 1994 | } |
| 1995 | |
| 1996 | /** |
| 1997 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected