(obj, path, bindFnToScope)
| 1543 | */ |
| 1544 | //TODO(misko): this function needs to be removed |
| 1545 | function getter(obj, path, bindFnToScope) { |
| 1546 | if (!path) return obj; |
| 1547 | var keys = path.split('.'); |
| 1548 | var key; |
| 1549 | var lastInstance = obj; |
| 1550 | var len = keys.length; |
| 1551 | |
| 1552 | for (var i = 0; i < len; i++) { |
| 1553 | key = keys[i]; |
| 1554 | if (obj) { |
| 1555 | obj = (lastInstance = obj)[key]; |
| 1556 | } |
| 1557 | } |
| 1558 | if (!bindFnToScope && isFunction(obj)) { |
| 1559 | return bind(lastInstance, obj); |
| 1560 | } |
| 1561 | return obj; |
| 1562 | } |
| 1563 | |
| 1564 | /** |
| 1565 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected