(obj, path, bindFnToScope)
| 1596 | */ |
| 1597 | //TODO(misko): this function needs to be removed |
| 1598 | function getter(obj, path, bindFnToScope) { |
| 1599 | if (!path) return obj; |
| 1600 | var keys = path.split('.'); |
| 1601 | var key; |
| 1602 | var lastInstance = obj; |
| 1603 | var len = keys.length; |
| 1604 | |
| 1605 | for (var i = 0; i < len; i++) { |
| 1606 | key = keys[i]; |
| 1607 | if (obj) { |
| 1608 | obj = (lastInstance = obj)[key]; |
| 1609 | } |
| 1610 | } |
| 1611 | if (!bindFnToScope && isFunction(obj)) { |
| 1612 | return bind(lastInstance, obj); |
| 1613 | } |
| 1614 | return obj; |
| 1615 | } |
| 1616 | |
| 1617 | /** |
| 1618 | * Return the DOM siblings between the first and last node in the given array. |
no test coverage detected