(iterator)
| 691 | return callback(); |
| 692 | } |
| 693 | function wrapIterator(iterator) { |
| 694 | return _restParam(function (err, args) { |
| 695 | if (err) { |
| 696 | callback.apply(null, [err].concat(args)); |
| 697 | } |
| 698 | else { |
| 699 | var next = iterator.next(); |
| 700 | if (next) { |
| 701 | args.push(wrapIterator(next)); |
| 702 | } |
| 703 | else { |
| 704 | args.push(callback); |
| 705 | } |
| 706 | ensureAsync(iterator).apply(null, args); |
| 707 | } |
| 708 | }); |
| 709 | } |
| 710 | wrapIterator(async.iterator(tasks))(); |
| 711 | }; |
| 712 |
no test coverage detected