* Create an iterator from an object with iterator-like behavior but a * different API name for the iteration method. * @template T * @param {!NodeIterator|!XPathResult} iterator * @param {string} nextProperty * @return {!Iterable }
(iterator, nextProperty)
| 139 | * @return {!Iterable<T>} |
| 140 | */ |
| 141 | function* createCommonIterator(iterator, nextProperty) { |
| 142 | let item; |
| 143 | while (Boolean((item = iterator[nextProperty]()))) { |
| 144 | yield item; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Create an iterator from an existing iterator, which nests the original |
no outgoing calls
no test coverage detected