(obj, path, bindFnToScope)
| 1857 | */ |
| 1858 | //TODO(misko): this function needs to be removed |
| 1859 | function getter(obj, path, bindFnToScope) { |
| 1860 | if (!path) return obj; |
| 1861 | var keys = path.split('.'); |
| 1862 | var key; |
| 1863 | var lastInstance = obj; |
| 1864 | var len = keys.length; |
| 1865 | |
| 1866 | for (var i = 0; i < len; i++) { |
| 1867 | key = keys[i]; |
| 1868 | if (obj) { |
| 1869 | obj = (lastInstance = obj)[key]; |
| 1870 | } |
| 1871 | } |
| 1872 | if (!bindFnToScope && isFunction(obj)) { |
| 1873 | return bind(lastInstance, obj); |
| 1874 | } |
| 1875 | return obj; |
| 1876 | } |
| 1877 | |
| 1878 | /** |
| 1879 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected