(err, result)
| 5621 | return (count === 0) ? callback() : proxy |
| 5622 | |
| 5623 | function proxy(err, result) { |
| 5624 | if (proxy.count <= 0) { |
| 5625 | throw new Error('after called too many times') |
| 5626 | } |
| 5627 | --proxy.count |
| 5628 | |
| 5629 | // after first error, rest are passed to err_cb |
| 5630 | if (err) { |
| 5631 | bail = true |
| 5632 | callback(err) |
| 5633 | // future error callbacks will go to error handler |
| 5634 | callback = err_cb |
| 5635 | } else if (proxy.count === 0 && !bail) { |
| 5636 | callback(null, result) |
| 5637 | } |
| 5638 | } |
| 5639 | } |
| 5640 | |
| 5641 | function noop() {} |
nothing calls this directly
no test coverage detected