1
2
3
4
5
6
7
8
9
10
| var call = require('../internals/function-call');
|
| module.exports = function (iterator, fn, $next) {
| var next = $next || iterator.next;
| var step, result;
| while (!(step = call(next, iterator)).done) {
| result = fn(step.value);
| if (result !== undefined) return result;
| }
| };
|
|